/* --- KTHDIGI DESIGN SYSTEM COMPATIBILITY --- */
@font-face {
    font-family: 'Phudu';
    src: url('https://kth-electric.com/wp-content/fonts/DT-Phudu/DTPhudu-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Ganh';
    src: url('https://kth-electric.com/wp-content/fonts/Ganh/Ganh%20Type-Regular.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

:root {
    /* Colors */
    --bg-light: #f8fafc;
    --text-color: #334155;
    --text-light: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --secondary: #fbbf24;
    --secondary-dark: #f59e0b;
    --white: #ffffff;
    --success: #16a34a;
    --error: #dc2626;

    /* Typography */
    --font-main: 'Ganh', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-head: 'Phudu', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-head) !important;
}

/* --- ACCESSIBILITY UTILITIES --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- HOVER & INTERACTION UTILITIES --- */
.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-lift-strong {
    transition: var(--transition-base);
}

.hover-lift-strong:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:hover::before {
    width: 300px;
    height: 300px;
}

.smooth-transition {
    transition: var(--transition-base);
}

/* --- STANDARDIZED HEADER (PREMIUM) --- */
.kth-header-premium {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

.nav-flex-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-premium {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-premium:hover {
    transform: scale(1.02);
}

.logo-icon-premium {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.logo-text-premium {
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.logo-main {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.logo-sub {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary-dark);
}

.header-links-premium {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link-premium {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.nav-link-premium:hover {
    color: var(--primary);
}

.nav-link-premium::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link-premium:hover::after {
    width: 100%;
}

/* --- STANDARDIZED FOOTER (PREMIUM) --- */
.footer-premium {
    background: #1e293b;
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
    position: relative;
}

.course-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.course-grid::-webkit-scrollbar {
    height: 8px;
}

.course-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.course-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
}

.course-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.course-grid>article {
    flex: 0 0 350px;
    scroll-snap-align: start;
}

@media (max-width: 768px) {
    .course-grid>article {
        flex: 0 0 300px;
    }
}

@media (max-width: 480px) {
    .course-grid>article {
        flex: 0 0 280px;
    }
}

/* --- PRO CARD SYSTEM (VERTICAL STACK) --- */
.card-modern {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-base);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #fbbf24 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(2, 132, 199, 0.15);
    border-color: rgba(2, 132, 199, 0.2);
}

.card-modern:hover::before {
    opacity: 1;
}

.card-modern .badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    width: auto;
}

.feature-icon-modern {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25);
    margin-bottom: 0;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.course-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
    font-weight: 800;
}

.course-price {
    font-size: 2rem;
    color: var(--primary);
    font-family: var(--font-head);
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
}

.course-price span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.course-desc {
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
    font-size: 1.05rem;
}

.card-cta {
    width: 100%;
    margin-top: auto;
}

/* Color Theme Variations */
.card-modern:nth-child(1) {
    border-left: 6px solid #0284c7;
    /* Blue for B Tự Động */
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.card-modern:nth-child(1):hover {
    border-left-color: #0369a1;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
}

.card-modern:nth-child(1) .feature-icon-modern {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.card-modern:nth-child(2) {
    border-left: 6px solid #f59e0b;
    /* Gold for B Số Sàn */
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.card-modern:nth-child(2):hover {
    border-left-color: #d97706;
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
}

.card-modern:nth-child(2) .feature-icon-modern {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.card-modern:nth-child(3) {
    border-left: 6px solid #ef4444;
    /* Red for Hạng C */
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.card-modern:nth-child(3):hover {
    border-left-color: #dc2626;
    background: linear-gradient(135deg, #ffffff 0%, #fee2e2 100%);
}

.card-modern:nth-child(3) .feature-icon-modern {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Enhanced Layout Spacing */
.card-modern {
    padding: 45px 40px;
    gap: 25px;
}

.card-content {
    gap: 15px;
}

.course-title {
    margin-bottom: 5px;
}

.course-price {
    margin-bottom: 5px;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .card-modern {
        flex-direction: column;
        text-align: center;
        padding: 35px 30px;
        gap: 25px;
    }

    .card-modern .badge {
        top: 15px;
        right: 15px;
    }

    .feature-icon-modern {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .course-title {
        font-size: 1.6rem;
    }

    .course-price {
        font-size: 1.8rem;
        justify-content: center;
    }

    .card-cta {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .card-modern {
        padding: 25px 20px;
    }

    .feature-icon-modern {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .course-title {
        font-size: 1.4rem;
    }
}

/* --- FEATURE GRID --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.feature-box {
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(2, 132, 199, 0.3);
}

.feature-box-icon {
    font-size: 24px;
    color: var(--primary);
}

.feature-box h4 {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.feature-box p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* --- TEACHER CARD --- */
.teacher-card {
    background: white;
    border: 2px solid var(--primary);
    box-shadow: 0 15px 30px rgba(2, 132, 199, 0.15);
}

.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.2);
}

.teacher-img img {
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* --- PRO BUTTON SYSTEM --- */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    font-family: var(--font-head);
    position: relative;
    overflow: hidden;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.5);
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

.btn-modern-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-modern-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.15);
}

.btn-modern-secondary:hover {
    transform: translateY(-3px);
    border-color: #0369a1;
    color: #0369a1;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.25);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.btn-modern:focus {
    outline: 3px solid rgba(2, 132, 199, 0.3);
    outline-offset: 3px;
}

.btn-modern i {
    transition: transform 0.3s ease;
}

.btn-modern:hover i {
    transform: translateX(4px);
}

/* --- SPLIT LAYOUT --- */
.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 968px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- SECTION SPACING --- */
.section-spacing {
    padding: 100px 0;
}

@media (max-width: 768px) {
    .section-spacing {
        padding: 60px 0;
    }

    .course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-logo-main {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    color: #38bdf8;
}

.footer-logo-sub {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
}

.footer-title {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.footer-links i {
    width: 16px;
    color: var(--secondary);
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-social {
    text-align: center;
    margin-bottom: 30px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}


.logo,
.brand-font {
    font-family: 'Phudu', sans-serif !important;
}

a {
    text-decoration: none;
    color: inherit;
}

* {
    box-sizing: border-box;
}

/* HEADER */
.kth-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: #0f7c78;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Old logo color kept */
.header-links a {
    margin-left: 20px;
    font-weight: 600;
    color: #64748b;
    font-size: 0.95rem;
    transition: 0.2s;
}

.header-links a:hover {
    color: var(--primary);
}

/* APP WRAPPER */
.app-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
}

/* --- LOGIN FORM STYLES (MATCHING SCREENSHOT) --- */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 60px;
}

.login-box {
    width: 100%;
    max-width: 800px;
    background: #eef8fc;
    /* Light blue background */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #bfdbfe;
}

.login-header {
    background: linear-gradient(180deg, #0056b3 0%, #0072bc 100%);
    color: white;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #004494;
}

.login-header .sub-title {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    font-family: sans-serif;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.login-header h1 {
    margin: 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.login-body {
    padding: 25px 40px;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-row label {
    width: 130px;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
    text-align: right;
    /* Align labels right like in screenshot? Or Left. Screenshot seems mixed. Let's keep Left. */
    text-align: left;
}

.form-control {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #334155;
    background: white;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
}

.form-control:disabled {
    background: #f1f5f9;
    color: #64748b;
}

.btn-check-info {
    background: #f59e0b;
    color: white;
    border: 1px solid #d97706;
    padding: 8px 15px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    font-family: sans-serif;
}

.btn-check-info:hover {
    background: #d97706;
}

/* CANDIDATE INFO SECTION */
.candidate-info-box {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
    padding-top: 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.avatar-placeholder {
    width: 110px;
    height: 130px;
    background: white;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.info-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    align-items: center;
}

.info-row .label {
    width: 100px;
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
}

.info-row .val {
    font-weight: 600;
    color: #dc2626;
    /* Default red for empty */
}

/* Info Input (Name) */
.info-input {
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    width: 300px;
    font-weight: bold;
    color: #0f172a;
}

/* FOOTER BUTTONS */
.login-footer {
    background: #e2e8f0;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid #cbd5e1;
}

.btn-action {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: sans-serif;
    transition: 0.2s;
}

.btn-start {
    background: #d1d5db;
    color: #4b5563;
    border-color: #9ca3af;
    cursor: not-allowed;
}

.btn-start.ready {
    background: white;
    color: #1e293b;
    border-color: #cbd5e1;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-start.ready:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Wait, screenshot shows Start button is simple greyish? No, usually it stands out. I'll make it standard logic. */

.btn-guide {
    background: #007bff;
    border-color: #0069d9;
}

.btn-guide:hover {
    background: #0069d9;
}

.btn-support {
    background: #28a745;
    border-color: #218838;
}

.btn-support:hover {
    background: #218838;
}


/* --- QUIZ INTERFACE (SIDEBAR + MAIN) --- */
.sidebar {
    width: 280px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.map-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.1s;
}

.map-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.map-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.map-btn.done {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
}

.map-btn.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.map-btn.wrong {
    background: var(--error);
    color: white;
    border-color: var(--error);
}

.main-content {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    min-height: 600px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.quiz-timer {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    background: #f0fdfa;
    padding: 5px 15px;
    border-radius: 6px;
}

.quiz-timer.urgent {
    color: var(--error);
    background: #fef2f2;
}

.question-area {
    margin-bottom: 30px;
    text-align: center;
}

.q-image {
    max-width: 100%;
    max-height: 500px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.answers-area {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.ans-btn {
    min-width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Phudu', sans-serif;
}

.ans-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0fdfa;
}

.ans-btn.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ans-btn.correct-show {
    background: var(--success) !important;
    color: white !important;
    border-color: var(--success) !important;
}

.ans-btn.wrong-show {
    background: var(--error) !important;
    color: white !important;
    border-color: var(--error) !important;
}

/* CONTROLS */
.controls-area {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.btn {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* RESULT SCREEN */
.result-screen {
    text-align: center;
    animation: fadeIn 0.5s;
}

.score-circle {
    width: 200px;
    height: 200px;
    border: 10px solid #e2e8f0;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Phudu';
}

.score-big {
    font-size: 4rem;
    line-height: 1;
}

.score-text {
    color: #64748b;
    font-size: 1.2rem;
}

.score-pass {
    border-color: var(--success);
    color: var(--success);
}

.score-fail {
    border-color: var(--error);
    color: var(--error);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .app-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        order: 2;
        max-height: 300px;
    }

    .main-content {
        width: 100%;
        order: 1;
    }

    /* Form responsive */
    .login-body {
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .form-row label {
        text-align: left;
        width: 100%;
    }

    .candidate-info-box {
        flex-direction: column;
        align-items: center;
    }

    .info-input {
        width: 100%;
    }
}

/* --- MODERNIZATION UPDATE 2026 --- */

/* Modern Variables */
:root {
    --gradient-primary: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-mesh: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 15px rgba(2, 132, 199, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Modern Hero Section */
.hero-modern {
    position: relative;
    padding: 100px 0 80px;
    background: #f8fafc;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    animation-delay: 0s;
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--secondary);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #0ea5e9;
    animation-delay: -2s;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.hero-title-modern {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.hero-subtitle-modern {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Modern Cards */
.card-modern {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* Specific style for Course Cards in Vertical Layout */
.course-grid .card-modern {
    flex-direction: row;
    align-items: center;
    gap: 30px;
    text-align: left;
    background: white;
}

.course-grid .card-modern .feature-icon-modern {
    margin-bottom: 0;
    width: 80px;
    height: 80px;
    font-size: 32px;
    flex-shrink: 0;
}

.course-grid .card-modern h3 {
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.course-grid .card-modern .course-price {
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.course-grid .card-modern p {
    margin-bottom: 0;
    flex-grow: 1;
    padding-right: 20px;
}

.course-grid .card-modern .btn-modern {
    white-space: nowrap;
    margin-top: 0;
    width: auto !important;
    /* Override inline style */
}

@media (max-width: 768px) {
    .course-grid .card-modern {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .course-grid .card-modern p {
        padding-right: 0;
        margin-bottom: 20px;
    }

    .course-grid .card-modern .btn-modern {
        width: 100% !important;
    }
}

.card-modern:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary);
    background: white;
}

.feature-icon-modern {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 20px;
    transition: 0.3s;
}

.card-modern:hover .feature-icon-modern {
    background: var(--gradient-primary);
    color: white;
    transform: rotate(5deg);
}

/* Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button Modern Update */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: 0.3s;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn-modern-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.5);
}

.btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(2, 132, 199, 0.6);
    filter: brightness(1.1);
}

/* Keyframes */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 40px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@media (max-width: 768px) {
    .hero-title-modern {
        font-size: 2.2rem;
    }

    .hero-modern {
        padding: 60px 0;
    }

    /* --- LAYOUT REFINEMENT (NEW) --- */
    .section-spacing {
        padding: 100px 0;
    }

    .feature-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
        margin-bottom: 50px;
    }

    .feature-box {
        background: #ffffff;
        padding: 30px;
        border-radius: 20px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--bg-light);
        transition: all 0.3s ease;
    }

    .feature-box:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary);
    }

    .feature-box-icon {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
        border-radius: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: var(--primary);
        margin-bottom: 20px;
    }

    .feature-box h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
        color: var(--text-color);
    }

    .feature-box p {
        color: var(--text-light);
        font-size: 0.95rem;
        line-height: 1.6;
    }


    .split-layout {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 60px;
        align-items: flex-start;
    }

    @media (max-width: 992px) {
        .split-layout {
            grid-template-columns: 1fr;
            gap: 40px;
        }
    }
}

/* --- REDUNDANT PRO DASHBOARD STYLES REMOVED --- */