﻿/* ============================================
   SAT Exam Platform - Professional Design
   Color Palette:
   - Primary: #1B3A5C (Deep Navy)
   - Secondary: #2C5F8A (Medium Blue)
   - Accent: #D4A843 (Warm Gold)
   - BG: #F5F6FA
   - Card: #FFFFFF
   - Text: #1A1A2E / #4A5568
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    background-color: #F5F6FA;
    color: #1A1A2E;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* === Navbar === */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #1B3A5C;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(27, 58, 92, 0.15);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 2px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

    .mobile-menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background: #FFFFFF;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

/* Nav Links */
.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 22px 20px;
    transition: all 0.25s ease;
    position: relative;
    display: block;
}

    .nav-link:hover {
        color: #FFFFFF;
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: #D4A843;
        transition: width 0.3s ease;
        border-radius: 3px 3px 0 0;
    }

    .nav-link:hover::after {
        width: 60%;
    }

/* Admin Links */
.admin-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-link {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
}

    .admin-link:hover {
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.35);
    }

.logout-link {
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
}

    .logout-link:hover {
        background: rgba(220, 53, 69, 0.15);
        border-color: rgba(220, 53, 69, 0.4);
        color: #ff8a8a;
    }

/* === Hero Slider === */
.hero-slider {
    margin-top: 68px;
    height: 600px;
    position: relative;
    overflow: hidden;
    background: #1B3A5C;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(27, 58, 92, 0.82) 0%, rgba(27, 58, 92, 0.6) 50%, rgba(27, 58, 92, 0.75) 100%);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-1 {
    background-image: url('https://mgx-backend-cdn.metadl.com/generate/images/994940/2026-02-28/151ab240-58bf-4246-8e44-dc5aa3acfd38.png');
    background-size: cover;
    background-position: center;
}

.slide-2 {
    background-image: url('https://mgx-backend-cdn.metadl.com/generate/images/994940/2026-02-28/b1137939-cdcb-44c6-bb16-f47537d439ff.png');
    background-size: cover;
    background-position: center;
}

.slide-3 {
    background-image: url('https://mgx-backend-cdn.metadl.com/generate/images/994940/2026-02-28/72bee7c8-412d-4a0c-b0e5-dff34ba1686a.png');
    background-size: cover;
    background-position: center;
}

.slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #FFFFFF;
    padding: 2rem;
    max-width: 700px;
}

.slide-badge {
    display: inline-block;
    background: rgba(212, 168, 67, 0.2);
    border: 1px solid rgba(212, 168, 67, 0.5);
    color: #D4A843;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease;
}

.slide-content h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.15;
    animation: fadeInUp 0.8s ease;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    line-height: 1.6;
    animation: fadeInUp 1s ease;
}

/* Slider Indicators */
.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

    .indicator.active {
        background: #D4A843;
        border-color: #D4A843;
        transform: scale(1.15);
    }

    .indicator:hover {
        border-color: #D4A843;
    }

/* CTA Button */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #D4A843;
    color: #1B3A5C;
    font-weight: 700;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}

    .cta-btn:hover {
        background: #c49a38;
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(212, 168, 67, 0.4);
    }

    .cta-btn:active {
        transform: translateY(0);
    }

/* Register Container */
.register-container {
    position: relative;
    margin-top: 10px;
    display: inline-block;
}

.auto-message {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(27, 58, 92, 0.95);
    color: #D4A843;
    padding: 10px 24px;
    border-radius: 8px;
    opacity: 0;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.4s ease, transform 0.4s ease;
    border: 1px solid rgba(212, 168, 67, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .auto-message::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        width: 12px;
        height: 12px;
        background: rgba(27, 58, 92, 0.95);
        border-right: 1px solid rgba(212, 168, 67, 0.3);
        border-bottom: 1px solid rgba(212, 168, 67, 0.3);
        transform: translateX(-50%) rotate(45deg);
    }

    .auto-message.show {
        opacity: 1;
        transform: translateX(-50%) translateY(-8px);
    }

/* Touch animation for CTA */
.cta-btn.touch {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(212, 168, 67, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Modal Overlay === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(27, 58, 92, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* === Modal (Result Login) === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 58, 92, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
}

    .modal.active {
        display: flex;
        justify-content: center;
        align-items: center;
    }

/* === Modal Content === */
.modal-content {
    background: #FFFFFF;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(27, 58, 92, 0.2), 0 0 0 1px rgba(27, 58, 92, 0.05);
    max-width: 500px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    color: #1A1A2E;
    transform: scale(0.95);
    transition: all 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content,
.modal.active .modal-content {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1B3A5C;
}

/* Close Buttons */
.close-modal, .close-btn {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
    line-height: 1;
    border-radius: 6px;
}

    .close-modal:hover, .close-btn:hover {
        color: #1B3A5C;
        background: #F1F5F9;
    }

/* Modal h2 for Result Login */
.modal-content h2 {
    margin-bottom: 2rem;
    color: #1B3A5C;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* === Form Styles === */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: #475569;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    color: #1A1A2E;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

    .form-input::placeholder {
        color: #94A3B8;
    }

    .form-input:focus {
        outline: none;
        border-color: #2C5F8A;
        background: #FFFFFF;
        box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
    }

.form-hint {
    color: #94A3B8;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

/* Phone Input */
.phone-input-container {
    display: flex;
    gap: 8px;
}

.country-selector {
    position: relative;
    width: 140px;
    flex-shrink: 0;
}

.country-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    color: #1A1A2E;
    cursor: pointer;
    transition: border-color 0.25s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

    .country-button:hover,
    .country-button:focus {
        border-color: #2C5F8A;
    }

.country-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.country-flag {
    font-size: 1.1rem;
}

.country-code {
    font-weight: 500;
    font-size: 0.9rem;
}

.dropdown-icon {
    transition: transform 0.3s ease;
    color: #94A3B8;
    display: flex;
    align-items: center;
}

.country-selector.open .dropdown-icon {
    transform: rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(27, 58, 92, 0.12);
    z-index: 50;
    max-height: 240px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
}

.country-selector.open .country-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.countries-list {
    max-height: 220px;
    overflow-y: auto;
}

    .countries-list::-webkit-scrollbar {
        width: 6px;
    }

    .countries-list::-webkit-scrollbar-track {
        background: #F8FAFC;
    }

    .countries-list::-webkit-scrollbar-thumb {
        background: #CBD5E1;
        border-radius: 3px;
    }

.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #1A1A2E;
    font-family: inherit;
    font-size: 0.9rem;
}

    .country-option:hover {
        background-color: #F1F5F9;
    }

.country-details {
    flex: 1;
    min-width: 0;
}

.country-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.88rem;
}

.country-phone {
    color: #94A3B8;
    font-size: 0.8rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1rem;
    margin-top: 6px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #F8FAFC;
}

    .radio-option:has(.radio-input:checked) {
        border-color: #2C5F8A;
        background: rgba(44, 95, 138, 0.05);
    }

.radio-input {
    width: 16px;
    height: 16px;
    accent-color: #2C5F8A;
    cursor: pointer;
}

.radio-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

/* Error Styles */
.form-error {
    background-color: #FEF2F2;
    color: #C53030;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid #FED7D7;
    display: none;
}

    .form-error.show {
        display: block;
    }

    .form-error p {
        margin: 2px 0;
    }

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem 0;
    display: none;
}

    .success-message.show {
        display: block;
    }

.success-icon {
    margin-bottom: 1rem;
}

.success-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1B3A5C;
    margin-bottom: 0.5rem;
}

.success-text {
    color: #64748B;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Button Styles */
.btn-group {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E2E8F0;
}

.btn-cancel {
    background: #F1F5F9;
    color: #475569;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
    border: 1.5px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

    .btn-cancel:hover {
        background: #E2E8F0;
        border-color: #CBD5E1;
    }

.btn-submit {
    background: #1B3A5C;
    color: #FFFFFF;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

    .btn-submit:hover:not(:disabled) {
        background: #2C5F8A;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(27, 58, 92, 0.2);
    }

    .btn-submit:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #1B3A5C;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    margin-top: 0.5rem;
}

    .submit-btn:hover {
        background: #2C5F8A;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(27, 58, 92, 0.2);
    }

/* === Footer === */
footer {
    background: #1B3A5C;
    color: #FFFFFF;
    padding: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 24px;
}

.footer-brand {
    text-align: center;
    margin-bottom: 24px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .footer-bottom p {
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.85rem;
    }

/* === Loading Animation === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #E2E8F0;
    border-radius: 50%;
    border-top-color: #2C5F8A;
    animation: spin 0.8s ease-in-out infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Modal Scrollbar === */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #F8FAFC;
    border-radius: 0 16px 16px 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

    .modal-content::-webkit-scrollbar-thumb:hover {
        background: #94A3B8;
    }

/* === Responsive Design === */

/* Tablet */
@media (max-width: 900px) {
    .hero-slider {
        height: 520px;
    }

    .slide-content h1 {
        font-size: 2.5rem;
    }

    .slide-content p {
        font-size: 1.05rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Navbar */
    .nav-inner {
        height: 60px;
        padding: 0 16px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #1B3A5C;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 8px 24px rgba(27, 58, 92, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.35s ease;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

        .nav-links.open {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
        }

    .nav-link {
        padding: 16px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 1rem;
    }

    .admin-links {
        gap: 8px;
    }

    .admin-link, .logout-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Hero */
    .hero-slider {
        margin-top: 60px;
        height: 480px;
    }

    .slide-badge {
        font-size: 0.75rem;
        padding: 5px 14px;
    }

    .slide-content {
        padding: 1.5rem;
    }

        .slide-content h1 {
            font-size: 2rem;
            margin-bottom: 0.75rem;
        }

        .slide-content p {
            font-size: 0.95rem;
            margin-bottom: 1.5rem;
        }

    .cta-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    .auto-message {
        font-size: 0.8rem;
        padding: 8px 16px;
        top: -48px;
    }

    .slider-indicators {
        bottom: 20px;
    }

    /* Modal */
    .modal-content {
        padding: 1.75rem;
        width: 95%;
        margin: 16px;
        max-height: 85vh;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    .phone-input-container {
        flex-direction: column;
    }

    .country-selector {
        width: 100%;
    }

    .radio-group {
        gap: 8px;
    }

    .radio-option {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .btn-group {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
        text-align: center;
    }

    /* Footer */
    .footer-inner {
        padding: 30px 16px 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-slider {
        height: 420px;
    }

    .slide-content h1 {
        font-size: 1.65rem;
    }

    .slide-content p {
        font-size: 0.88rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        width: 100%;
    }
}
