/* Container styles */
.model-viewer-container {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 2rem;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Header styles */
.page-header {
    display: block;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    order: -1; /* Ensures header is always first */
    position: relative;
}

.page-header h1 {
    color: #1e293b;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
    word-wrap: break-word;
    padding-left: 1rem;
    font-weight: 700;
    max-width: 100%;
}

.education-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.education-tag {
    display: inline-block;
    background-color: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.education-separator {
    color: #94a3b8;
    margin: 0 0.25rem;
    align-self: center;
}

.description {
    color: #475569;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
    padding-left: 1rem;
    font-size: 1.125rem;
}

/* Model content styles */
.model-content {
    width: 100%;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.controls {
    margin-bottom: 1rem;
    width: 100%;
}

.animation-dropdown {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    color: #1e293b;
    font-size: 0.875rem;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
}

.animation-dropdown:focus {
    outline: none;
    border-color: #0E38AB;
    box-shadow: 0 0 0 3px rgba(14, 56, 171, 0.1);
}

model-viewer {
    width: 100%;
    height: 60vh;
    min-height: 300px;
    max-height: 700px;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    max-width: 100%;
}

.ar-button {
    background-color: #0E38AB;
    border-radius: 4px;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
}

.ar-button:hover {
    background-color: #0c2d8a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .model-viewer-container {
        padding: 0.5rem;
        gap: 1rem;
        width: 100vw;
    }

    model-viewer {
        height: 50vh;
    }
}

@media (max-width: 480px) {
    .model-viewer-container {
        padding: 0.25rem;
    }

    model-viewer {
        height: 40vh;
    }

    .ar-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

.qr-code-container {
    margin-top: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.qr-code-container h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.1rem;
}

#qrcode {
    display: inline-block;
    padding: 1rem;
    background: white;
}

/* Header styling */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    gap: 1rem;
}


.buttons-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

/* QR Button styling */
.qr-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.qr-button:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.qr-button i {
    font-size: 1.1rem;
    color: #0E38AB;
}

/* poster button styling */
.poster-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    font-weight: 450;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    text-decoration: none;
}

.poster-button:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.poster-button svg {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

/* Modal styling */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.qr-modal.active {
    display: flex;
}

.qr-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

.qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.qr-modal-header h3 {
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 600;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #1e293b;
}

.qr-modal-body {
    text-align: center;
}

.qr-modal-body p {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

#qrcode {
    display: inline-block;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styling */
@media (max-width: 640px) {
    .header-top {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0;
        flex: 1;
    }
    
    .qr-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .qr-button span {
        display: none;
    }
    
    .qr-button i {
        margin: 0;
        font-size: 1.25rem;
    }
}