:root {
    --bg-dark: #101727;
    --bg-light-trans: rgba(255, 255, 255, 0.05);
    --primary-accent: #43D8C9;
    --secondary-accent: #F4B400;
    --text-light: #E0E0E0;
    --text-dark: #FFFFFF;
    --font-heading: 'Lexend', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

#main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease, padding 0.4s ease;
    padding: 20px 0;
}

#main-header.scrolled {
    background: rgba(16, 23, 39, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-accent);
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--text-dark);
}

.btn-secondary {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    color: var(--bg-dark);
    border: none;
    font-weight: 700;
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(67, 216, 201, 0.2);
}

.hamburger {
    display: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(67, 216, 201, 0.15) 0%, rgba(67, 216, 201, 0) 70%);
    top: 10%;
    left: 15%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.1) 0%, rgba(244, 180, 0, 0) 70%);
    bottom: 15%;
    right: 20%;
}

section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: var(--text-dark);
}

.stats {
    background-color: rgba(255, 255, 255, 0.03);
}

.stats .container {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stats h3 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--primary-accent);
}

.stats p {
    color: var(--text-light);
}

.features {
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244, 180, 0, 0.15) 0%, rgba(244, 180, 0, 0) 70%);
    transform: translateY(-50%);
    z-index: -1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-accent);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 15px;
}

.testimonials {
    background-color: rgba(255, 255, 255, 0.03);
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    flex: 0 0 100%;
    padding: 0 20px;
    text-align: center;
}

.testimonial-slide img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-accent);
    margin-bottom: 20px;
}

.testimonial-slide blockquote {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-slide cite {
    font-weight: 700;
    color: var(--text-dark);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-light-trans);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dark);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: var(--primary-accent);
    color: var(--bg-dark);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

.cta {
    background: linear-gradient(45deg, #1A2949, #101727);
    text-align: center;
}

.cta h2 {
    color: var(--text-dark);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta p {
    margin-bottom: 30px;
}

footer {
    background-color: #0C111D;
    padding: 40px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-media a {
    color: var(--text-light);
    margin-left: 20px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-media a:hover {
    color: var(--primary-accent);
}

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 60%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 100;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 25px 0;
    }

    .hamburger {
        display: block;
        z-index: 101;
    }

    header .btn {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .stats .container {
        flex-direction: column;
        gap: 40px;
    }

    .slider-btn {
        top: auto;
        bottom: -20px;
    }

    .prev-btn {
        left: 30%;
    }

    .next-btn {
        right: 30%;
    }

    .testimonials .container {
        padding-bottom: 60px;
    }

    footer .container {
        flex-direction: column;
        gap: 15px;
    }
}



/* === STYLES FOR TOEFL TEST PAGE === */

#test-interface {
    padding-top: 80px;
    min-height: 100vh;
}

.test-header {
    background: rgba(16, 23, 39, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-light-trans);
}

.test-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-buttons {
    display: flex;
    gap: 10px;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--bg-light-trans);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-accent);
    color: var(--bg-dark);
    border-color: var(--primary-accent);
}

.timer-container {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary-accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-body {
    padding-top: 50px;
    padding-bottom: 50px;
}

.test-section {
    display: none;
}

.test-section.active {
    display: block;
}

.question-area {
    margin-bottom: 40px;
}

.question-title {
    font-family: var(--font-heading);
    color: var(--primary-accent);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--bg-light-trans);
    padding-bottom: 10px;
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-top: 20px;
}

#listening-player-container audio {
    filter: invert(1); /* Basic styling for dark mode */
    margin-top: 15px;
    width: 100%;
}

.reading-passage-container {
    background: var(--bg-light-trans);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}
.reading-passage-container h4 {
    color: var(--secondary-accent);
    margin-bottom: 15px;
}
.passage p {
    font-size: 1rem;
    line-height: 1.8;
}

.answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.answer-options label {
    background: var(--bg-light-trans);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}
.answer-options label:hover {
    border-color: var(--primary-accent);
}

.answer-options input[type="radio"] {
    display: none;
}
.answer-options input[type="radio"]:checked + span {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
}
.answer-options input[type="radio"]:checked + span::before {
    transform: scale(1);
}

.answer-options .radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-light);
    border-radius: 50%;
    margin-right: 15px;
    display: inline-grid;
    place-items: center;
    transition: all 0.2s ease;
}
.answer-options .radio-custom::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    transform: scale(0);
    transition: transform 0.2s ease;
}
.answer-options .option-text {
    color: var(--text-light);
}

.test-navigation {
    margin-top: 50px;
    border-top: 1px solid var(--bg-light-trans);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-indicator {
    font-weight: 500;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.btn-nav, .btn-finish {
    background-color: var(--bg-light-trans);
    color: var(--text-light);
    border: 1px solid var(--primary-accent);
    border-radius: 8px;
    padding: 12px 25px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-nav:hover {
    background-color: var(--primary-accent);
    color: var(--bg-dark);
}
.btn-finish {
    background-color: var(--secondary-accent);
    border-color: var(--secondary-accent);
    color: var(--bg-dark);
}
.btn-finish:hover {
    opacity: 0.9;
}


.hidden {
    display: none !important;
}

#user-profile-display {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 15px 5px 5px;
    border-radius: 50px;
}

#user-profile-display span {
    font-weight: 500;
    color: var(--text-light);
}

#user-profile-display img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-accent);
}

.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(16, 23, 39, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-modal-content {
    background: var(--bg-dark);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--bg-light-trans);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.profile-modal-content h2 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 10px;
}

.profile-modal-content .form-group {
    margin: 25px 0;
    text-align: left;
}

.profile-modal-content label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.profile-modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    background: var(--bg-light-trans);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 15px;
}

.avatar-option {
    width: 100%;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.avatar-option:hover {
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--primary-accent);
    transform: scale(1.1);
}

.profile-modal-content .btn-secondary {
    width: 100%;
    margin-top: 10px;
}