/* ============================================================
   LYZAMASTERY — style.css
   Custom overrides & components on top of Bootstrap 5
   Semua class backend (.form-box, .exam-card, .cbt-wrapper,
   .timer-box, .question-nav, .answer-option, .result-stat,
   .review-card, .correct, .wrong, .explanation-box, dll)
   TETAP ADA agar halaman PHP lain tidak rusak.
============================================================ */

/* ---------- Base Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f8fafc;
    color: #111827;
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    width: 100%;
}

input, textarea, select, button {
    max-width: 100%;
}


/* ============================================================
   NAVBAR
============================================================ */
.lyz-navbar {
    background: #0f172a;
    padding: 14px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.lyz-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff !important;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.lyz-navbar .nav-link {
    color: rgba(255,255,255,.8) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 12px !important;
    border-radius: 8px;
    transition: color .2s, background .2s;
}

.lyz-navbar .nav-link:hover,
.lyz-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.08);
}

/* Outline Button di navbar */
.lyz-btn-outline {
    border: 1.5px solid rgba(255,255,255,.4) !important;
    border-radius: 8px !important;
}

.lyz-btn-outline:hover {
    border-color: #fff !important;
    background: rgba(255,255,255,.1) !important;
}

/* Primary Button di navbar */
.lyz-btn-primary {
    background: #2563eb !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
}

.lyz-btn-primary:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
}

/* Hamburger warna putih */
.navbar-toggler-icon {
    filter: invert(1);
}

/* Mobile nav spacing */
@media (max-width: 991px) {
    #navbarMain {
        border-top: 1px solid rgba(255,255,255,.1);
        margin-top: 10px;
        padding-top: 10px;
    }

    .lyz-btn-outline,
    .lyz-btn-primary {
        display: inline-block;
        width: auto;
    }
}


/* ============================================================
   HERO
============================================================ */
.lyz-hero {
    min-height: 90vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1d4ed8 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

/* Decorative blob */
.lyz-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,.25) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.lyz-badge {
    background: rgba(37,99,235,.25);
    border: 1px solid rgba(37,99,235,.5);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.lyz-hero-title {
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 12px 0;
    background: linear-gradient(90deg, #fff 60%, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lyz-hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255,255,255,.75);
    max-width: 520px;
    margin: 0 auto;
}

/* Hero CTA buttons */
.lyz-cta-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(37,99,235,.4);
}

.lyz-cta-primary:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(37,99,235,.5);
}

.lyz-cta-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.5);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background .2s, border-color .2s, transform .2s;
}

.lyz-cta-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-3px);
}

@media (max-width: 575px) {
    .lyz-cta-primary,
    .lyz-cta-outline {
        width: 100%;
        text-align: center;
    }
}


/* ============================================================
   STATS BAR
============================================================ */
.lyz-stats {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.lyz-stat-item {
    padding: 10px 0;
}

.lyz-stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}

.lyz-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}


/* ============================================================
   SECTION UMUM
============================================================ */
.lyz-section {
    background: #f8fafc;
}

.lyz-section-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: #0f172a;
}

.lyz-section-sub {
    color: #6b7280;
    font-size: 1rem;
    margin-top: 8px;
}


/* ============================================================
   CARDS KATEGORI
============================================================ */
.lyz-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    transition: transform .25s, box-shadow .25s;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.lyz-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.lyz-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.lyz-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.lyz-card-sub {
    color: #6b7280;
    font-size: 0.875rem;
    flex: 1;
}

.lyz-card-link {
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 16px;
    transition: gap .2s;
}

.lyz-card-link:hover {
    text-decoration: underline;
}


/* ============================================================
   CTA BOTTOM SECTION
============================================================ */
.lyz-cta-section {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #fff;
}

.lyz-cta-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
}

.lyz-cta-desc {
    color: rgba(255,255,255,.75);
    font-size: 1rem;
}


/* ============================================================
   FOOTER
============================================================ */
.lyz-footer {
    background: #0f172a;
    color: rgba(255,255,255,.6);
    font-size: 0.875rem;
}


/* ============================================================
   LEGACY CONTAINER (dipakai halaman lain)
============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}


/* ============================================================
   LEGACY — NAVBAR LAMA (backward compat)
   Halaman lain yang masih pakai .navbar, .nav-flex, .menu
============================================================ */
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.menu a {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 8px;
    white-space: nowrap;
    color: rgba(255,255,255,.8);
    text-decoration: none;
}

.menu a:hover {
    color: #fff;
}


/* ============================================================
   LEGACY — HERO (backward compat untuk halaman lain)
============================================================ */
.hero {
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a, #1e293b, #2563eb);
    color: #fff;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    color: #fff;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: rgba(255,255,255,.8);
}


/* ============================================================
   BUTTON UMUM
============================================================ */
.btn {
    padding: 14px 30px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-start {
    display: inline-block;
    padding: 14px 30px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: .2s;
}

.btn-start:hover {
    transform: translateY(-2px);
    color: white;
}


/* ============================================================
   SECTION UMUM LAMA
============================================================ */
.section {
    padding: 80px 0;
}

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


/* ============================================================
   CARD UMUM LAMA
============================================================ */
.card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: .3s;
}

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

.card h3 {
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 10px;
}


/* ============================================================
   FORM BOX (login.php, register.php)
============================================================ */
.form-box {
    width: 100%;
    max-width: 450px;
    margin: 80px auto;
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

.form-box h2 {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

.btn-submit:hover {
    background: #1d4ed8;
}


/* ============================================================
   DASHBOARD
============================================================ */
.dashboard {
    padding: 40px 20px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}


/* ============================================================
   SIDEBAR
============================================================ */
.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: #0f172a;
    color: white;
    overflow-y: auto;
}

.main {
    margin-left: 250px;
    padding: 20px;
}


/* ============================================================
   EXAM CARD (exams.php)
============================================================ */
.exam-card {
    max-width: 700px;
    margin: 50px auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}


/* ============================================================
   CBT / UJIAN
============================================================ */
.cbt-wrapper {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.timer-box {
    position: sticky;
    top: 20px;
    background: #dc2626;
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.question-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.q-number {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 10px;
    background: #e5e7eb;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: .2s;
}

.q-number:hover {
    background: #d1d5db;
}

.q-number.answered {
    background: #16a34a;
    color: white;
}

.question-box {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: .25s;
}

.answer-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    border-color: #2563eb;
    background: #eff6ff;
}

.answer-option.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: scale(1.02);
}

.answer-option input {
    margin-right: 10px;
}

.btn-prev,
.btn-next {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-right: 10px;
    font-weight: 600;
}

.btn-prev {
    background: #e5e7eb;
    color: #374151;
}

.btn-next {
    background: #2563eb;
    color: white;
}

.btn-finish {
    padding: 12px 24px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-finish:hover {
    background: #b91c1c;
}


/* ============================================================
   PROGRESS BAR
============================================================ */
.progress-wrapper {
    width: 100%;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 20px;
    height: 22px;
}

.progress-bar {
    height: 22px;
    width: 0%;
    background: #16a34a;
    color: white;
    font-size: 12px;
    text-align: center;
    line-height: 22px;
    font-weight: 600;
    transition: .3s;
}


/* ============================================================
   HASIL / REVIEW
============================================================ */
.result-stat {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.result-stat p {
    margin: 10px 0;
    font-size: 16px;
}

.review-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,.08);
}

.correct {
    color: #16a34a;
    font-weight: 700;
}

.wrong {
    color: #dc2626;
    font-weight: 700;
}

.explanation-box {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
}


/* ============================================================
   RESPONSIVE — Mobile & Tablet
============================================================ */
@media (max-width: 768px) {
    /* Sidebar jadi full-width relative */
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    /* Dashboard */
    .dashboard {
        padding: 20px 15px;
    }

    /* Form */
    .form-box {
        width: 95%;
        padding: 25px 20px;
        margin: 40px auto;
    }

    /* Hero lama */
    .hero {
        padding: 40px 20px;
        height: auto;
        min-height: 85vh;
    }

    /* Section */
    .section {
        padding: 50px 0;
    }

    /* Card */
    .card {
        padding: 20px;
    }

    /* CBT */
    .cbt-wrapper {
        padding: 15px;
    }

    .timer-box {
        font-size: 18px;
        padding: 12px;
    }

    .q-number {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }

    .exam-card {
        margin: 20px auto;
        padding: 20px;
    }

    /* Grid lama */
    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lyz-hero {
        padding: 60px 0 40px;
        min-height: 80vh;
    }

    .lyz-stat-number {
        font-size: 1.3rem;
    }

    .btn-prev,
    .btn-next,
    .btn-finish {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}
