﻿/* ============================================
   Princeton Review — Monthly Exams
   Premium Official LIGHT Ivory & Gold Design v4
   ============================================ */

:root {
    /* Soft warm ivory / cream palette — not pure white, not dark */
    --bg-deep: #f3ede1;
    --bg-primary: #f8f2e6;
    --bg-secondary: #fbf6ec;
    --bg-card: #ffffff;
    --bg-card-hover: #fffaf0;
    --bg-input: #fdfaf3;
    /* Burnished gold (warm, refined, no neon) */
    --gold-100: #e8c98a;
    --gold: #b8860b;
    --gold-dark: #9a6f09;
    --gold-deeper: #7a5607;
    --gold-glow: rgba(184, 134, 11, 0.14);
    --gold-border: rgba(184, 134, 11, 0.28);
    --gold-subtle: rgba(184, 134, 11, 0.07);
    /* Text colors on light background */
    --text-primary: #2a2418;
    --text-secondary: #6b5f4a;
    --text-muted: #9a8d74;
    /* Borders */
    --border: rgba(184, 134, 11, 0.18);
    --border-light: rgba(184, 134, 11, 0.28);
    --success: #2f8a5f;
    --error: #b54545;
    /* Soft refined shadows */
    --shadow-sm: 0 2px 8px rgba(120, 90, 20, 0.08);
    --shadow-md: 0 6px 20px rgba(120, 90, 20, 0.12);
    --shadow-lg: 0 12px 36px rgba(120, 90, 20, 0.16);
    --shadow-xl: 0 20px 60px rgba(120, 90, 20, 0.22);
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
}

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

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(135deg, #f6efdf 0%, #fbf6ec 50%, #f3ebd6 100%);
    position: relative;
}

/* ── Background Image Layer (very subtle) ── */
.bg-image-layer {
    position: fixed;
    inset: 0;
    background-image: url('/web/images/168a23e5-eb3d-4880-b2fe-46acf1ff7d93.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0.88;

}
    .bg-image-layer::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( 180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.7) 100% );
    }

/* ── Decorative Layer ── */
.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.25);
}

.bg-gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.55;
}

.bg-gradient-orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(232, 201, 138, 0.45) 0%, transparent 65%);
    top: -250px;
    right: -200px;
    animation: orb1 22s ease-in-out infinite;
}

.bg-gradient-orb-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(218, 188, 127, 0.4) 0%, transparent 65%);
    bottom: -180px;
    left: -180px;
    animation: orb2 28s ease-in-out infinite;
}

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes orb1 {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-35px, 28px);
    }
}

@keyframes orb2 {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(28px, -35px);
    }
}

/* ── Header ── */
header {
    background: rgba(251, 246, 236, 0.85);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid rgba(184, 134, 11, 0.12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 20px rgba(120, 90, 20, 0.06);
}

    header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(184, 134, 11, 0.4) 50%, transparent 100%);
    }

nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.025em;
    transition: color var(--t);
}

.logo-icon {
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.12), rgba(232, 201, 138, 0.18));
    border: 1px solid var(--gold-border);
    transition: all var(--t);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.1);
}

.logo:hover .logo-icon {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.22), rgba(232, 201, 138, 0.28));
    transform: rotate(-5deg);
    box-shadow: 0 4px 14px rgba(184, 134, 11, 0.18);
}

.logo-text {
    background: linear-gradient(135deg, #2a2418 0%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover {
    color: var(--gold);
}

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

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    transition: all var(--t);
    backdrop-filter: blur(8px);
}

    .admin-link:hover {
        background: #fffaf0;
        border-color: var(--gold-border);
        color: var(--gold-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    background: transparent;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    transition: all var(--t);
}

    .logout-link:hover {
        color: var(--error);
        border-color: rgba(181, 69, 69, 0.4);
        background: rgba(181, 69, 69, 0.06);
    }

/* ── Error Banner ── */
.error-banner {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #c25454, #b54545);
    color: white;
    padding: 0.8rem 1.4rem;
    border-radius: var(--r-md);
    z-index: 9999;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ── Main ── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 140px);
    padding: 8rem 1.5rem 6rem;
}

.content-wrapper {
    width: 100%;
    max-width: 900px;
    text-align: center;
}

/* ── Badge ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 22px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--gold-border);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold-dark);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    animation: fadeInUp 0.5s ease backwards;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.1);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(184, 134, 11, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(1.6);
    }
}

/* ── Title ── */
.main-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.3rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
    animation: fadeInUp 0.55s ease backwards;
    animation-delay: 0.08s;
    background: linear-gradient(135deg, #ffffff 0%, #f3d288 45%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 2px rgba(122, 86, 7, 0.15));
}

/* ── Title Divider ── */
.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 1.25rem 0 1.5rem;
    animation: fadeInUp 0.6s ease backwards;
    animation-delay: 0.12s;
}

.divider-line {
    display: inline-block;
    width: 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), var(--gold), var(--gold-border), transparent);
}

.divider-ornament {
    color: var(--gold);
    display: flex;
    align-items: center;
    filter: drop-shadow(0 0 8px rgba(184, 134, 11, 0.4));
    animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Description ── */
.main-description {
    font-size: 1.08rem;
    color: #ffffff;
    margin-bottom: 3rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.78;
    animation: fadeInUp 0.6s ease backwards;
    animation-delay: 0.18s;
    font-weight: bolder;
}

/* ── Levels ── */
.levels-section {
    margin-top: 0.5rem;
}

.levels-heading {
    font-size: 0.72rem;
    font-weight: bolder;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease backwards;
    animation-delay: 0.24s;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

/* ── Level Button ── */
.level-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(253, 250, 243, 0.88) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-weight: 600;
    color: var(--text-primary);
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all var(--t);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    font-family: var(--font);
    text-align: left;
    backdrop-filter: blur(14px);
    animation: fadeInUp 0.55s ease backwards;
    box-shadow: 0 2px 10px rgba(120, 90, 20, 0.06);
}

    .level-btn:nth-child(1) {
        animation-delay: 0.28s;
    }

    .level-btn:nth-child(2) {
        animation-delay: 0.34s;
    }

    .level-btn:nth-child(3) {
        animation-delay: 0.40s;
    }

    .level-btn:nth-child(4) {
        animation-delay: 0.46s;
    }

    .level-btn:nth-child(5) {
        animation-delay: 0.52s;
    }

    .level-btn:nth-child(6) {
        animation-delay: 0.58s;
    }

    .level-btn:nth-child(7) {
        animation-delay: 0.64s;
    }

    .level-btn:nth-child(8) {
        animation-delay: 0.70s;
    }

    .level-btn::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, var(--gold-dark), var(--gold), var(--gold-100));
        opacity: 0;
        transition: opacity var(--t);
    }

    .level-btn::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(110deg, transparent 0%, rgba(232, 201, 138, 0.25) 50%, transparent 100%);
        transform: translateX(-100%);
        transition: transform 0.7s ease;
    }

.level-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    opacity: 0.65;
    transition: all var(--t);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.level-btn-name {
    flex: 1;
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
}

.level-btn-arrow {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    transition: all var(--t);
    position: relative;
    z-index: 1;
}

.level-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fffaf0 100%);
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(184, 134, 11, 0.12);
}

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

    .level-btn:hover::after {
        transform: translateX(100%);
    }

    .level-btn:hover .level-btn-icon {
        opacity: 1;
        color: var(--gold-dark);
        transform: scale(1.15);
    }

    .level-btn:hover .level-btn-arrow {
        color: var(--gold);
        transform: translateX(6px);
    }

/* ── Footer ── */
footer {
    background: rgba(251, 246, 236, 0.9);
    backdrop-filter: blur(14px);
    text-align: center;
    padding: 1.2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-top: 1px solid rgba(184, 134, 11, 0.1);
}

    footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(184, 134, 11, 0.35) 50%, transparent 100%);
    }

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    letter-spacing: 0.03em;
}

.footer-ornament {
    color: var(--gold);
    opacity: 0.7;
    font-size: 0.7rem;
}

/* ── Registration Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 45, 20, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--t);
    padding: 1rem;
}

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

.modal-content {
    background: linear-gradient(160deg, #ffffff 0%, #fdfaf3 100%);
    padding: 2.4rem 2.5rem;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(184, 134, 11, 0.12);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--text-primary);
    border: 1px solid var(--border);
    transform: scale(0.94) translateY(14px);
    transition: transform var(--t);
    position: relative;
}

    .modal-content::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--gold-deeper), var(--gold), var(--gold-100), var(--gold), var(--gold-deeper));
        background-size: 200% auto;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        animation: shimmer 4s linear infinite;
    }

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

    100% {
        background-position: 200% 50%;
    }
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    padding-right: 1rem;
    background: linear-gradient(135deg, #2a2418 0%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: rgba(253, 250, 243, 0.9);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    transition: all var(--t);
    flex-shrink: 0;
    line-height: 1;
}

    .close-btn:hover {
        color: var(--gold-dark);
        background: #fffaf0;
        border-color: var(--gold-border);
        transform: rotate(90deg);
    }

/* ── Form ── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 0.78rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}

    .form-input::placeholder {
        color: var(--text-muted);
    }

    .form-input:focus {
        outline: none;
        border-color: var(--gold);
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.12);
    }

.form-hint {
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 0.35rem;
    display: block;
}

/* ── Phone Input ── */
.phone-input-container {
    display: flex;
    gap: 0.5rem;
}

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

.country-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.78rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color var(--t);
    font-family: var(--font);
}

    .country-button:hover,
    .country-button:focus {
        border-color: var(--gold);
    }

.country-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.country-code {
    font-weight: 600;
    font-size: 0.88rem;
}

.dropdown-icon {
    font-size: 0.62rem;
    color: var(--text-muted);
    transition: transform var(--t);
}

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

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 240px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--t);
}

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

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

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

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

    .countries-list::-webkit-scrollbar-thumb {
        background: var(--border-light);
        border-radius: 4px;
    }

.country-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    transition: background-color 0.18s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
}

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

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

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

.country-phone {
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* ── Radio ── */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.95rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    transition: all var(--t);
}

    .radio-option:hover {
        border-color: var(--gold-border);
        background: #fffaf0;
    }

    .radio-option:has(.radio-input:checked) {
        border-color: var(--gold);
        background: rgba(184, 134, 11, 0.08);
        box-shadow: 0 2px 8px rgba(184, 134, 11, 0.1);
    }

.radio-input {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: var(--gold);
}

.radio-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Error / Success ── */
.form-error {
    background: rgba(181, 69, 69, 0.08);
    border: 1px solid rgba(181, 69, 69, 0.3);
    color: #a83a3a;
    padding: 0.75rem 1rem;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: left;
    display: none;
}

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

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

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

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

.success-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    filter: drop-shadow(0 0 14px rgba(184, 134, 11, 0.35));
}

.success-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin-bottom: 0.6rem;
}

.success-text {
    color: var(--text-secondary);
    margin-bottom: 1.4rem;
    line-height: 1.65;
}

/* ── Buttons ── */
.btn-group {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.8rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--t);
    font-family: var(--font);
    font-size: 0.875rem;
}

    .btn-cancel:hover {
        background: #fffaf0;
        color: var(--text-primary);
        border-color: var(--gold-border);
    }

.btn-submit {
    background: linear-gradient(135deg, var(--gold-deeper) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    background-size: 200% auto;
    color: #ffffff;
    font-weight: 700;
    padding: 0.7rem 1.95rem;
    border-radius: var(--r-sm);
    border: none;
    cursor: pointer;
    transition: all var(--t);
    font-family: var(--font);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    animation: shimmer 4s linear infinite;
    box-shadow: 0 4px 14px rgba(184, 134, 11, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

    .btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(184, 134, 11, 0.42);
    }

    .btn-submit:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        animation: none;
        transform: none;
    }

/* ── Exam Purpose Modal (Month & Variant) ── */
.exam-purpose-overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 45, 20, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInOverlay 0.28s ease forwards;
    padding: 1rem;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.exam-purpose-box {
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(184, 134, 11, 0.1);
    background: linear-gradient(160deg, #ffffff 0%, #fdfaf3 100%);
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0.94) translateY(12px);
    opacity: 0;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

    .exam-purpose-box::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--gold-deeper), var(--gold), var(--gold-100), var(--gold), var(--gold-deeper));
        background-size: 200% auto;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        animation: shimmer 4s linear infinite;
    }

@keyframes popIn {
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.exam-purpose-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    color: var(--gold);
    filter: drop-shadow(0 2px 10px rgba(184, 134, 11, 0.3));
}

.exam-purpose-box h2 {
    font-family: var(--font-serif);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.6rem;
    letter-spacing: -0.015em;
    background: linear-gradient(135deg, #2a2418, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.exam-purpose-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

.exam-purpose-buttons-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--r-md);
    cursor: pointer;
    width: 100%;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #ffffff, #fdfaf3);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--t);
    text-align: left;
    font-family: var(--font);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(120, 90, 20, 0.05);
}

    .exam-purpose-buttons-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, var(--gold-dark), var(--gold));
        opacity: 0;
        transition: opacity var(--t);
    }

    .exam-purpose-buttons-item:hover {
        background: linear-gradient(135deg, #fffaf0, #fff5e0);
        border-color: var(--gold);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

        .exam-purpose-buttons-item:hover::before {
            opacity: 1;
        }

.exam-purpose-close-btn {
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    font-size: 0.875rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t);
    font-family: var(--font);
}

    .exam-purpose-close-btn:hover {
        color: var(--text-primary);
        border-color: var(--gold-border);
        background: #fffaf0;
    }

/* ── Variant Buttons (Special A/B styling) ── */
.variant-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    border-radius: var(--r-md);
    cursor: pointer;
    width: 100%;
    transition: all var(--t);
    font-family: var(--font);
    color: white;
    border: 1px solid transparent;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.variant-btn-a {
    background: linear-gradient(135deg, #4a6fa5, #3d5a87);
    border-color: #4a6fa5;
    box-shadow: 0 4px 14px rgba(74, 111, 165, 0.25);
}

.variant-btn-b {
    background: linear-gradient(135deg, #b86a4a, #a0553c);
    border-color: #b86a4a;
    box-shadow: 0 4px 14px rgba(184, 106, 74, 0.25);
}

.variant-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.variant-btn-a:hover {
    box-shadow: 0 10px 28px rgba(74, 111, 165, 0.4);
}

.variant-btn-b:hover {
    box-shadow: 0 10px 28px rgba(184, 106, 74, 0.4);
}

.variant-btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.variant-btn-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.variant-btn-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.variant-btn-desc {
    font-size: 0.78rem;
    opacity: 0.88;
}

/* ── Loading ── */
.loading {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 0.75s ease-in-out infinite;
    margin: 1rem auto;
}

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

/* ── Scrollbar ── */
.modal-content::-webkit-scrollbar,
.exam-purpose-box::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track,
.exam-purpose-box::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb,
.exam-purpose-box::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f3ebd6;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--gold);
    }

/* ── Selection ── */
::selection {
    background: rgba(184, 134, 11, 0.3);
    color: var(--text-primary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 0.7rem;
        text-align: center;
        padding: 0.7rem 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    main {
        padding-top: 10rem;
        padding-bottom: 6rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 6px 16px;
    }

    .main-title {
        font-size: 1.9rem;
    }

    .main-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .levels-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .level-btn {
        padding: 1rem 1.15rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1.6rem 1.6rem;
        margin: 0.5rem;
        border-radius: var(--r-lg);
    }

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

    .country-selector {
        width: 100%;
    }

    .btn-group {
        flex-direction: column-reverse;
        gap: 0.65rem;
    }

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

    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-links {
        flex-direction: row;
        gap: 7px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-link, .logout-link {
        font-size: 0.78rem;
        padding: 0.45rem 0.9rem;
    }

    footer {
        padding: 0.8rem;
        font-size: 0.72rem;
    }

    .exam-purpose-box {
        padding: 1.75rem 1.4rem 1.4rem;
    }
}

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

    .main-title {
        font-size: 1.6rem;
    }

    .divider-line {
        width: 50px;
    }

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

    .exam-purpose-box h2 {
        font-size: 1.25rem;
    }
}

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

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