/* CSS Variables for Themes */
:root {
    --primary: #2A0A2C;
    --secondary: #DD88CF;
    --accent: #F8E7F6;
    --light: #F5F5F5;
    --dark: #4B164C;
    --gold: #FFD700;
    --text-primary: #F8E7F6;
    --navbar-bg: rgba(42, 10, 44, 0.98);
    --gradient: linear-gradient(135deg, #2A0A2C 0%, #4B164C 50%, #DD88CF 100%);
    --logo-gradient: linear-gradient(45deg, #FFD700 0%, #DD88CF 50%, #4B164C 100%);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] {
    --primary: #F8E7F6;
    --secondary: #4B164C;
    --accent: #2A0A2C;
    --light: #2A0A2C;
    --dark: #F5F5F5;
    --gold: #4B164C;
    --text-primary: #2A0A2C;
    --navbar-bg: rgba(248, 231, 246, 0.98);
    --gradient: linear-gradient(135deg, #F8E7F6 0%, #DD88CF 50%, #4B164C 100%);
    --logo-gradient: linear-gradient(45deg, #4B164C 0%, #DD88CF 50%, #FFD700 100%);
    --glass: rgba(42, 10, 44, 0.05);
    --glass-border: rgba(42, 10, 44, 0.1);
    --glass-highlight: rgba(42, 10, 44, 0.15);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--primary);
    color: var(--text-primary);
    font-family: 'Sahel', 'Poppins', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.8;
    transition: background 0.5s ease, color 0.3s ease;
    perspective: 1000px;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease, visibility 1s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.loading-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--gold);
    transition: width 2s ease;
}

/* Luxury Background Animation */
.luxury-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 3D Floating Letters Animation */
.floating-letters {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.floating-letters span {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Montserrat', sans-serif;
    color: rgba(248, 231, 246, 0.15);
    animation: floatLetters 25s infinite ease-in-out;
    user-select: none;
    filter: drop-shadow(0 0 8px var(--gold));
    text-transform: uppercase;
    transform-style: preserve-3d;
    text-shadow: 
        2px 2px 0 var(--gold),
        4px 4px 0 rgba(0,0,0,0.2);
    transition: all 0.5s ease;
}

.floating-letters span:hover {
    color: var(--gold);
    transform: scale(1.5) rotateY(180deg);
    filter: drop-shadow(0 0 15px var(--gold));
}

@keyframes floatLetters {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg) rotateY(0deg); opacity: 0.3; }
    25% { transform: translateY(-25vh) translateX(15vw) rotate(15deg) rotateY(45deg); opacity: 0.5; }
    50% { transform: translateY(20vh) translateX(-20vw) rotate(-10deg) rotateY(90deg); opacity: 0.7; }
    75% { transform: translateY(-15vh) translateX(-25vw) rotate(10deg) rotateY(135deg); opacity: 0.4; }
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--navbar-bg);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(-20px);
}

.navbar.visible {
    opacity: 1;
    transform: translateY(0);
}

.navbar.scrolled {
    padding: 0.5rem 5%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateZ(20px);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    transform-style: preserve-3d;
}

.academy-name {
    font-size: 1.8rem;
    background-image: var(--logo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    letter-spacing: -1px;
    transform: translateZ(10px);
    transition: all 0.3s ease;
}

.logo-img {
    height: 70px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transform-style: preserve-3d;
    transform: translateZ(20px);
}

.logo-img:hover {
    transform: rotate(-5deg) scale(1.1) translateZ(30px);
    filter: drop-shadow(0 0 15px var(--gold));
}

.theme-switcher {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--gold);
    border-radius: 30px;
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: var(--text-primary);
    backdrop-filter: blur(5px);
    transform-style: preserve-3d;
    transform: translateZ(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05) translateZ(15px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    transform-style: preserve-3d;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    transform-style: preserve-3d;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: translateZ(5px);
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gold);
    transition: width 0.3s ease;
    transform: translateZ(10px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(221,136,207,0.1) 100%);
    z-index: -1;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-links a:hover::before {
    width: 100%;
}

.nav-links a:hover::after {
    opacity: 1;
}

/* Page Styles */
.page {
    display: none;
    min-height: 100vh;
    padding: 7rem 5% 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    transform-style: preserve-3d;
    width: 100%;
    overflow-y: auto;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.page-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Page Transition Animation */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    z-index: 9998;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

/* 3D Content Box with Glass Morphism */
.content-box {
    background: var(--glass);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 1.5rem 0;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 0 1px var(--glass-border);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.content-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 0%,
        var(--glass-highlight) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shine 6s infinite;
    z-index: -1;
}

@keyframes shine {
    0% { transform: rotate(30deg) translate(-30%, -30%); }
    100% { transform: rotate(30deg) translate(30%, 30%); }
}

.content-box:hover {
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px var(--glass-border),
        0 0 20px rgba(255, 215, 0, 0.2);
}

.content-box h1, 
.content-box h2, 
.content-box h3 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateZ(10px);
}

.content-box h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background-image: linear-gradient(45deg, var(--gold), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.content-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
    position: relative;
    display: inline-block;
}

.content-box h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--secondary), transparent);
    border-radius: 2px;
}

.content-box p {
    margin-bottom: 1.5rem;
    transform: translateZ(5px);
}

/* 3D Course Section */
.course-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
}

.course-section:hover {
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.course-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,215,0,0) 0%,
        rgba(255,215,0,0.1) 50%,
        rgba(255,215,0,0) 100%);
    animation: courseGlow 3s infinite;
}

@keyframes courseGlow {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.course-section h3 {
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-section h3::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -5px;
    width: 50px;
    height: 3px;
    background: var(--gold);
}

.course-section h3 i {
    font-size: 1.5rem;
    color: var(--secondary);
}

/* 3D Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--accent);
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    gap: 10px;
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0.1) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.badge:hover {
    transform: translateY(-3px) translateZ(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.badge:hover::before {
    transform: translateX(100%);
}

.badge i {
    font-size: 1.3rem;
    transform: translateZ(5px);
}

/* 3D Button with Hover Effect */
.btn {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 16px;
    padding: 1.2rem 2.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px) saturate(180%);
    background: linear-gradient(45deg, 
        rgba(255,215,0,0.15) 0%,
        rgba(221,136,207,0.15) 50%,
        rgba(75,22,76,0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    margin: 1rem 0;
    transform-style: preserve-3d;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,215,0,0.3) 0%,
        rgba(221,136,207,0.3) 50%,
        rgba(75,22,76,0.3) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover {
    transform: translateY(-4px) scale(1.05) translateZ(10px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.3),
                0 0 12px rgba(255, 255, 255, 0.2);
    filter: brightness(1.15) contrast(1.1);
}

.btn:hover::before {
    opacity: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* 3D Floating Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

.floating-icons i {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(255, 215, 0, 0.3);
    animation: floatIcons 15s infinite linear;
    transform-style: preserve-3d;
}

@keyframes floatIcons {
    0% {
        transform: translateY(0) rotate(0deg) translateZ(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg) translateZ(50px);
        opacity: 0;
    }
}

/* 3D Translate Button */
.translate-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    font-family: 'Sahel', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 40px rgba(42, 16, 74, 0.4);
    z-index: 1000;
    transform-style: preserve-3d;
    overflow: hidden;
}

.translate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,215,0,0.2) 0%,
        rgba(221,136,207,0.2) 50%,
        rgba(75,22,76,0.2) 100%);
    z-index: -1;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.translate-btn:hover {
    transform: translateY(-3px) translateZ(10px);
    box-shadow: 0 15px 45px rgba(42, 16, 74, 0.6);
}

.translate-btn:hover::before {
    transform: translateX(0);
}

/* 3D Footer */
footer {
    background: var(--dark);
    color: var(--text-primary);
    padding: 2rem 5%;
    text-align: center;
    border-top: 2px solid var(--gold);
    transform-style: preserve-3d;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 1.5rem 0;
}

.social-icons a {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.social-icons a:hover {
    color: var(--gold);
    transform: translateY(-5px) translateZ(10px);
    text-shadow: 0 0 15px var(--gold);
}

/* Responsive Image Container */
.image-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transition: all 0.5s ease;
    position: relative;
    border: 3px solid var(--gold);
}

.image-container:hover {
    transform: translateY(-5px) translateZ(10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* Developer Page Styles */
.developer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.developer-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
}

.developer-avatar:hover {
    transform: rotateY(20deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.developer-info {
    margin-bottom: 2rem;
}

.developer-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.developer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.developer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.contact-item i {
    color: var(--gold);
    font-size: 1.5rem;
}

.developer-notes {
    text-align: right;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border-left: 4px solid var(--gold);
}

.developer-notes h3 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.developer-notes ul {
    list-style-type: none;
    padding-right: 1.5rem;
}

.developer-notes li {
    margin-bottom: 1rem;
    position: relative;
}

.developer-notes li::before {
    content: '•';
    color: var(--gold);
    font-size: 1.5rem;
    position: absolute;
    right: -1.5rem;
    top: -0.3rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-box h1 {
        font-size: 3rem;
    }
    
    .content-box h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .content-box {
        padding: 2rem;
    }
    
    .content-box h1 {
        font-size: 2.5rem;
    }
    
    .content-box h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        padding: 100px 20px;
        transition: right 0.3s ease;
        backdrop-filter: blur(15px);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .academy-name {
        display: none;
    }

    .translate-btn {
        bottom: 20px;
        left: 20px;
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .content-box h1 {
        font-size: 2.2rem;
    }
    
    .content-box h2 {
        font-size: 1.8rem;
    }

    /* Developer page responsive */
    .developer-avatar {
        width: 150px;
        height: 150px;
    }

    .developer-info h2 {
        font-size: 2rem;
    }

    .developer-info h3 {
        font-size: 1.3rem;
    }

    .contact-item {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .content-box {
        padding: 1.5rem;
    }
    
    .content-box h1 {
        font-size: 1.8rem;
    }
    
    .content-box h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 1rem 2rem;
    }

    /* Developer page responsive */
    .developer-avatar {
        width: 120px;
        height: 120px;
    }

    .developer-info h2 {
        font-size: 1.8rem;
    }

    .developer-info h3 {
        font-size: 1.2rem;
    }

    .developer-notes {
        padding: 1.5rem;
    }

    .developer-notes h3 {
        font-size: 1.5rem;
    }
/* Level Determination Page Styles */
/* Level Determination Page - Universal Styles */
.level-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

.intro-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

.start-btn {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 300px;
    display: inline-block;
    box-sizing: border-box;
}

.chat-container {
    background: rgba(42, 10, 44, 0.5);
    border-radius: 20px;
    padding: 1rem;
    height: auto;
    min-height: 400px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.message {
    max-width: 90%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    position: relative;
    animation: fadeIn 0.3s ease;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.95rem;
    align-self: flex-start;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message {
    background: rgba(75, 22, 76, 0.7);
    border-bottom-left-radius: 5px;
}

.user-message {
    background: rgba(255, 215, 0, 0.15);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 15px;
    height: 15px;
}

.bot-message::after {
    left: -7px;
    background: rgba(75, 22, 76, 0.7);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.user-message::after {
    right: -7px;
    background: rgba(255, 215, 0, 0.15);
    clip-path: polygon(0 0, 0 100%, 100% 0);
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1 1 calc(50% - 0.6rem);
    min-width: 120px;
    text-align: center;
    box-sizing: border-box;
}

.option-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-3px);
}

.option-btn.correct {
    background: rgba(0, 200, 0, 0.3);
    border-color: #0a0;
}

.option-btn.incorrect {
    background: rgba(200, 0, 0, 0.3);
    border-color: #a00;
}

.result-container {
    text-align: center;
    padding: 1.5rem;
    background: rgba(75, 22, 76, 0.5);
    border-radius: 20px;
    margin: 1.5rem auto;
    border: 2px solid var(--gold);
    backdrop-filter: blur(10px);
    width: 100%;
    box-sizing: border-box;
}

.book-suggestion {
    font-size: 1.5rem;
    color: var(--gold);
    margin: 0.8rem 0;
    font-weight: 700;
    line-height: 1.3;
}

.level-badge {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    background: var(--logo-gradient);
    color: #fff;
    font-weight: bold;
    margin: 0.8rem 0;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.progress-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 5px;
    margin: 1.2rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gold);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 5px;
}

.result-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.2rem;
}

.result-buttons .btn {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .chat-container {
        min-height: 500px;
    }
    
    .message {
        max-width: 80%;
        font-size: 1rem;
    }
    
    .option-btn {
        flex: 1 1 calc(25% - 0.8rem);
    }
    
    .book-suggestion {
        font-size: 1.7rem;
    }
}

@media (orientation: landscape) {
    .level-container {
        padding: 0 10px;
    }
    
    .chat-container {
        min-height: 300px;
        max-height: 65vh;
        padding: 0.8rem;
    }
    
    .chat-messages {
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .message {
        padding: 0.7rem;
        font-size: 0.9rem;
        max-width: 85%;
    }
    
    .options-container {
        gap: 0.5rem;
    }
    
    .option-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        flex: 1 1 calc(33% - 0.5rem);
    }
    
    .result-container {
        padding: 1rem;
    }
    
    .book-suggestion {
        font-size: 1.3rem;
    }
    
    .level-badge {
        font-size: 1.1rem;
        padding: 0.5rem 1.2rem;
    }
    
    .result-buttons .btn {
        min-width: 130px;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .intro-card {
        padding: 1.2rem;
        margin: 1rem 0;
    }
    
    .start-btn {
        padding: 0.9rem 1.2rem;
        font-size: 1rem;
        max-width: 250px;
    }
    
    .chat-container {
        min-height: 350px;
        max-height: 60vh;
    }
    
    .option-btn {
        flex: 1 1 100%;
    }
    
    .result-buttons .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .intro-card {
        padding: 1rem;
    }
    
    .message {
        padding: 0.6rem 0.8rem;
        font-size: 0.88rem;
        max-width: 95%;
    }
    
    .options-container {
        gap: 0.5rem;
    }
    
    .option-btn {
        padding: 0.6rem;
        font-size: 0.84rem;
    }
    
    .result-container {
        padding: 1rem;
    }
    
    .book-suggestion {
        font-size: 1.3rem;
    }
    
    .level-badge {
        font-size: 1rem;
        padding: 0.5rem 1.2rem;
    }
    
    .progress-container {
        margin: 1rem 0;
    }
}

@media (max-height: 600px) {
    .chat-container {
        min-height: 250px;
        max-height: 55vh;
    }
    
    .chat-messages {
        gap: 0.5rem;
    }
    
    .message {
        padding: 0.5rem 0.7rem;
        font-size: 0.86rem;
    }
    
    .options-container {
        margin-top: 0.5rem;
        gap: 0.4rem;
    }
    
    .option-btn {
        padding: 0.5rem;
        font-size: 0.82rem;
    }
    
    .result-container {
        padding: 0.8rem;
        margin: 1rem auto;
    }
    
    .book-suggestion {
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }
    
    .level-badge {
        font-size: 0.95rem;
        padding: 0.4rem 1rem;
    }
    
    .progress-container {
        margin: 0.8rem 0;
        height: 8px;
    }
}

@media (min-width: 1920px) {
    .level-container {
        max-width: 1000px;
    }
    
    .chat-container {
        min-height: 600px;
    }
    
    .message {
        max-width: 70%;
        font-size: 1.1rem;
        padding: 1rem 1.2rem;
    }
    
    .options-container {
        gap: 1rem;
    }
    
    .option-btn {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .book-suggestion {
        font-size: 2rem;
    }
    
    .level-badge {
        font-size: 1.5rem;
        padding: 1rem 2rem;
    }
}
}