
/* ===== Traffic Signs Test â€” Creative Educational UI ===== */

:root {
    --bg: #e8ecf1;
    --card-bg: #ffffff;
    --footer-bg: #606d80;
    --blue: #4a41ce;
    --blue-light: #736af4;
    --green: #27ae60;
    --orange: #e67e22;
    --red: #e74c3c;
    --text-dark: #2c3e50;
    --text-mid: #5a6a7d;
    --text-light: #8899aa;
    --text-white: #ffffff;
    --border: #d5dce6;
    --shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
    --shadow-hover: 0 12px 40px rgba(44, 62, 80, 0.15);
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter {
    animation: fadeUp .45s cubic-bezier(.22, 1, .36, 1) forwards;
}

.page-exit {
    animation: fadeOut .25s cubic-bezier(.55, 0, 1, .45) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* ===== NAVBAR ===== */
.navbar {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 60;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow .3s;
}

.navbar.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4a41ce, #9b8aff);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(74, 65, 206, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    animation: logoShine 4s ease-in-out infinite;
}

@keyframes logoShine {

    0%,
    100% {
        transform: translateX(-100%) rotate(-45deg);
    }

    50% {
        transform: translateX(100%) rotate(-45deg);
    }
}

.nav-logo svg {
    width: 22px;
    height: 22px;
    color: white;
    position: relative;
    z-index: 1;
}

.nav-brand-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'Cairo', sans-serif;
}

.nav-link:hover {
    background: #f0f4f8;
    color: var(--text-dark);
}

.nav-link.active {
    background: #edf2ff;
    color: var(--blue);
}

.nav-cta-btn {
    padding: 8px 20px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #4a41ce, #9b8aff);
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 3px 10px rgba(74, 65, 206, 0.25);
    transition: all .25s;
    margin-right: 8px;
}

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(74, 65, 206, 0.3);
}

/* ===== Mobile hamburger ===== */
.nav-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    transition: all .2s;
}

.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all .3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 700px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0 16px 16px;
        gap: 4px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
        display: none;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-link,
    .nav-cta-btn {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .nav-cta-btn {
        margin-top: 4px;
    }

    .navbar-inner {
        padding: 10px 16px;
        position: relative;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(160deg, #1f1b63 0%, #4a41ce 30%, #736af4 60%, #4a41ce 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb.o1 {
    width: 300px;
    height: 300px;
    background: rgba(0, 210, 255, 0.15);
    top: -80px;
    right: 10%;
    animation-delay: 0s;
}

.hero-orb.o2 {
    width: 200px;
    height: 200px;
    background: rgba(108, 92, 231, 0.12);
    bottom: -60px;
    left: 5%;
    animation-delay: -3s;
}

.hero-orb.o3 {
    width: 150px;
    height: 150px;
    background: rgba(255, 215, 0, 0.08);
    top: 50%;
    left: 40%;
    animation-delay: -5s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(15px, -20px) scale(1.1);
    }

    66% {
        transform: translate(-10px, 15px) scale(0.95);
    }
}

.hero-grid-dots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 100%);
}

.hero-float {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.07;
    font-size: 48px;
    animation: floatSign 10s ease-in-out infinite;
}

.hero-float.f1 {
    top: 12%;
    right: 6%;
    animation-delay: 0s;
    font-size: 60px;
}

.hero-float.f2 {
    bottom: 18%;
    right: 22%;
    animation-delay: -2s;
    font-size: 42px;
}

.hero-float.f3 {
    top: 28%;
    left: 4%;
    animation-delay: -4s;
    font-size: 38px;
}

.hero-float.f4 {
    bottom: 8%;
    left: 12%;
    animation-delay: -6s;
    font-size: 46px;
}

@keyframes floatSign {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 56px 44px;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    animation: fadeUp .6s .1s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.6);
    }
}

.hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.6px;
    animation: fadeUp .6s .2s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-title .highlight {
    position: relative;
    background: linear-gradient(90deg, #ffd700, #ffa500, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.hero-desc {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 500px;
    animation: fadeUp .6s .3s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-btns {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    animation: fadeUp .6s .4s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #4a41ce;
    font-size: 15px;
    font-weight: 800;
    padding: 14px 30px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    position: relative;
    overflow: hidden;
}

.hero-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(74, 65, 206, 0.08) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .6s;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.hero-cta:hover::after {
    transform: translateX(100%);
}

.hero-cta svg {
    width: 18px;
    height: 18px;
}

.hero-cta-sec {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all .3s;
    backdrop-filter: blur(4px);
}

.hero-cta-sec:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-cta-sec svg {
    width: 16px;
    height: 16px;
}

.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    animation: fadeUp .6s .5s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-stat-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
}

.hero-stat-num {
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.hero-stat-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.7;
}

.hero-stat-sep {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
}

.hero-image {
    flex-shrink: 0;
    width: 360px;
    position: relative;
    animation: fadeUp .6s .3s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.12);
}

.hero-image-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.2) 0%, transparent 70%);
    border-radius: 40px;
    pointer-events: none;
    z-index: -1;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.hero-img-badge {
    position: absolute;
    bottom: -12px;
    right: -10px;
    background: white;
    color: #4a41ce;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: bounceBadge 3s ease-in-out infinite;
    z-index: 3;
}

@keyframes bounceBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        padding: 36px 24px;
        gap: 24px;
    }

    .hero-image {
        width: 260px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        margin: 0 auto 24px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-img-badge {
        right: 10px;
        bottom: -10px;
    }
}

@media (max-width: 500px) {
    .hero-inner {
        padding: 28px 16px;
    }

    .hero-image {
        width: 200px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .hero-stats {
        gap: 14px;
    }

    .hero-stat-circle {
        width: 44px;
        height: 44px;
    }

    .hero-stat-num {
        font-size: 15px;
    }

    .hero-stat-label {
        font-size: 11px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta,
    .hero-cta-sec {
        width: 100%;
        justify-content: center;
    }
}

/* ===== SECTION LABEL ===== */
.section-label {
    padding: 22px 28px 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 14px 28px 52px;
}

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 500px) {
    .card-grid {
        grid-template-columns: 1fr;
        padding: 14px 16px 40px;
    }

    .section-label {
        padding: 18px 16px 0;
    }
}
/* ===== CARD ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all .32s cubic-bezier(.22, 1, .36, 1);
    animation: cardPop .5s cubic-bezier(.22, 1, .36, 1) both;
}

.card:nth-child(1) {
    animation-delay: .03s;
}

.card:nth-child(2) {
    animation-delay: .06s;
}

.card:nth-child(3) {
    animation-delay: .09s;
}

.card:nth-child(4) {
    animation-delay: .12s;
}

.card:nth-child(5) {
    animation-delay: .15s;
}

.card:nth-child(6) {
    animation-delay: .18s;
}

@keyframes cardPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
}

.card:active {
    transform: translateY(-2px);
    transition-duration: .1s;
}

/* Card image area */
.card-img {
    height: 175px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    background: #f5f7fa;
}

.card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.card:hover .card-img img {
    transform: scale(1.06);
}

/* Card footer */
.card-foot {
    background: var(--footer-bg);
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: ltr;
}

.card-foot-title {
    color: var(--text-white);
    font-size: 14.5px;
    font-weight: 700;
}

.card-foot-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    font-size: 13px;
    font-weight: 800;
    padding: 3px 14px;
    border-radius: 20px;
    min-width: 28px;
    text-align: center;
}

/* ===== NAV (quiz/results) ===== */
#app-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ===== QUIZ PAGE ===== */
.quiz-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 20px 56px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    box-shadow: var(--shadow);
    transition: all .2s;
    margin-bottom: 20px;
}

.back-btn:hover {
    background: #f7f9fb;
    color: var(--text-dark);
}

/* Progress */
.prog-track {
    height: 10px;
    background: #e0e5ec;
    border-radius: 99px;
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    border-radius: 99px;
    transition: width .5s cubic-bezier(.22, 1, .36, 1);
    position: relative;
}

.prog-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    animation: shine 2.5s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Quiz card */
.quiz-card {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, .04);
    overflow: hidden;
}

.sign-area {
    background: linear-gradient(150deg, #f0f4f8, #e2e8f0);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px;
    margin-bottom: 0;
    border-radius: 14px;
}

.sign-area img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .1));
}

/* Question Image */
.q-image-wrap {
    width: 100%;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf1 100%);
    min-height: 180px;
    position: relative;
}

.q-image {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    display: block;
}

.q-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 20px;
    color: #a0b0c0;
    width: 100%;
    min-height: 180px;
    background: linear-gradient(160deg, #f4f7fa 0%, #e9eef4 50%, #f0f3f7 100%);
    border-bottom: 2px dashed #d0d8e4;
    position: relative;
    overflow: hidden;
}

.q-image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(74, 65, 206, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.q-image-placeholder svg {
    opacity: 0.5;
    transition: opacity .3s;
}

.q-image-placeholder:hover svg {
    opacity: 0.7;
}

.q-image-placeholder span {
    font-size: 13px;
    font-weight: 600;
    color: #9aafc0;
    letter-spacing: 0.3px;
}

@media (max-width: 500px) {
    .q-image-wrap {
        min-height: 140px;
    }

    .q-image-placeholder {
        min-height: 140px;
        padding: 24px 16px;
    }

    .q-image-placeholder svg {
        width: 36px;
        height: 36px;
    }

    .q-image {
        max-height: 200px;
    }
}

/* Question Timer */
.q-timer-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4f8 100%);
    border-bottom: 1px solid #e2e7ed;
    position: relative;
}

.q-timer-circle {
    width: 44px;
    height: 44px;
    position: relative;
    flex-shrink: 0;
}

.q-timer-circle svg {
    width: 44px;
    height: 44px;
    transform: rotate(-90deg);
}

.q-timer-bg {
    fill: none;
    stroke: #e8ecf1;
    stroke-width: 3;
}

.q-timer-ring {
    fill: none;
    stroke: #4a41ce;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
}

.q-timer-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #4a41ce;
    transition: color 0.5s ease;
    font-family: 'Cairo', sans-serif;
}

.q-timer-fill {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #4a41ce, #736af4);
    transition: width 30s linear, background 0.5s ease;
}

.q-timer-danger {
    animation: timerPulse 0.6s ease-in-out infinite;
}

@keyframes timerPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@media (max-width: 500px) {
    .q-timer-bar {
        padding: 10px 16px;
        gap: 10px;
    }

    .q-timer-circle {
        width: 38px;
        height: 38px;
    }

    .q-timer-circle svg {
        width: 38px;
        height: 38px;
    }

    .q-timer-num {
        font-size: 12px;
    }

    .q-timer-fill {
        height: 5px;
    }
}

.q-text {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.55;
}

.q-hint {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 14px;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid #ffcc80;
}

/* Options */
.opt {
    transition: all .25s cubic-bezier(.22, 1, .36, 1);
    border: 2px solid #e2e7ed;
    border-radius: 12px;
    padding: 14px 16px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.opt:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    border-color: #b5c4d4;
}

.opt-ltr {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #d0d8e2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-light);
    flex-shrink: 0;
    background: #f8fafc;
    transition: all .25s;
}

.opt-txt {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-mid);
}

.opt.selected {
    border-color: var(--blue);
    background: #f0f6ff;
    box-shadow: 0 0 0 3px rgba(74, 65, 206, .12);
}

.opt.selected .opt-ltr {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
    box-shadow: 0 3px 10px rgba(74, 65, 206, .3);
}

.opt.selected .opt-txt {
    color: var(--text-dark);
}

.opt.correct {
    border-color: var(--green);
    background: #edfcf2;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, .12);
}

.opt.incorrect {
    border-color: var(--red);
    background: #fdf3f3;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, .12);
}

.opt:nth-child(1) {
    animation: oSlide .4s .04s cubic-bezier(.22, 1, .36, 1) both;
}

.opt:nth-child(2) {
    animation: oSlide .4s .08s cubic-bezier(.22, 1, .36, 1) both;
}

.opt:nth-child(3) {
    animation: oSlide .4s .12s cubic-bezier(.22, 1, .36, 1) both;
}

.opt:nth-child(4) {
    animation: oSlide .4s .16s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes oSlide {
    from {
        opacity: 0;
        transform: translateX(14px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== BUTTONS ===== */
.btn-main {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: white;
    font-weight: 700;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    padding: 13px 30px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(74, 65, 206, .28);
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    position: relative;
    overflow: hidden;
}

.btn-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 35%, rgba(255, 255, 255, .15) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform .6s;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(74, 65, 206, .32);
}

.btn-main:hover::after {
    transform: translateX(100%);
}

.btn-main:disabled {
    opacity: .4;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-sec {
    background: white;
    color: var(--text-mid);
    font-weight: 600;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .2s;
    box-shadow: var(--shadow);
}

.btn-sec:hover {
    background: #f7f9fb;
    color: var(--text-dark);
}

/* ===== RESULTS ===== */
.res-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 20px 56px;
}

.res-card {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, .04);
    padding: 36px 28px;
    text-align: center;
}

.res-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.score-ring {
    transition: stroke-dashoffset 1.4s cubic-bezier(.22, 1, .36, 1);
}

.s-val {
    font-size: 34px;
    font-weight: 900;
    color: var(--text-dark);
}

.s-pct {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.g-exc {
    color: #27ae60;
}

.g-gd {
    color: #4a41ce;
}

.g-fr {
    color: #e67e22;
}

.g-pr {
    color: #e74c3c;
}

.res-detail {
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, .04);
    padding: 22px 24px;
    margin-top: 16px;
}

.ans-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e8edf2;
}

.ans-row.ok {
    background: #f0faf3;
    border-color: #c3e8ce;
}

.ans-row.no {
    background: #fdf3f3;
    border-color: #f0c4c4;
}

.ans-ico {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ans-ico.ok {
    background: #d4f5dd;
    color: #27ae60;
}

.ans-ico.no {
    background: #fddede;
    color: #e74c3c;
}

/* ===== TOAST ===== */
#toast {
    background: var(--text-dark) !important;
    color: white !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}

.toast-visible {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

/* ===== CONFETTI ===== */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    top: 0;
    border-radius: 2px;
    animation: confetti-fall 3s ease-in forwards;
    pointer-events: none;
    z-index: 99;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #eef1f5;
}

::-webkit-scrollbar-thumb {
    background: #c5cdd7;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8b4c0;
}

::selection {
    background: rgba(74, 65, 206, .15);
}

.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;
}

/* ====================================================
   PDF LESSONS SECTION
   ==================================================== */

.pdf-section {
    padding: 0 28px 52px;
}

@media (max-width: 600px) {
    .pdf-section {
        padding: 0 16px 40px;
    }
}

.pdf-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pdf-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.pdf-section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.pdf-section-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: -1px;
}

.pdf-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    min-width: 200px;
    transition: all .2s;
    box-shadow: var(--shadow);
}

.pdf-search-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(74, 65, 206, 0.1);
}

.pdf-search-input {
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    background: transparent;
    width: 100%;
}

.pdf-search-input::placeholder {
    color: var(--text-light);
}

@media (max-width: 600px) {
    .pdf-search-wrap {
        min-width: 100%;
        order: 3;
    }
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 900px) {
    .pdf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .pdf-grid {
        grid-template-columns: 1fr;
    }
}

.pdf-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    animation: cardPop .5s cubic-bezier(.22, 1, .36, 1) both;
    position: relative;
}

.pdf-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.pdf-card:active {
    transform: translateY(-1px);
    transition-duration: .1s;
}

.pdf-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdf-card-emoji {
    font-size: 24px;
    line-height: 1;
}

.pdf-card-body {
    flex: 1;
    min-width: 0;
}

.pdf-card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.pdf-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-card-meta {
    display: flex;
    gap: 14px;
    align-items: center;
}

.pdf-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}

.pdf-action-btn,
.pdf-download-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .25s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    align-self: center;
}

.pdf-action-btn:hover,
.pdf-download-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
}

.pdf-card-ready {
    border: 1px solid transparent;
    transition: all .3s;
}

.pdf-card-ready:hover {
    border-color: rgba(74, 65, 206, 0.2);
}

.pdf-card-soon {
    opacity: 0.7;
}

.pdf-card-soon:hover {
    opacity: 0.85;
}

.pdf-meta-available {
    font-weight: 700;
}

.pdf-meta-coming {
    color: var(--text-light);
    font-style: italic;
}

.pdf-skeleton {
    pointer-events: none;
}

.pdf-skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(90deg, #e8ecf1 25%, #f0f3f7 50%, #e8ecf1 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.pdf-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.pdf-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8ecf1 25%, #f0f3f7 50%, #e8ecf1 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.pdf-skeleton-line.w80 {
    width: 80%;
}

.pdf-skeleton-line.w50 {
    width: 50%;
}

/* ====================================================
   LEARNING SERIES PAGE
   ==================================================== */

/* Series Header */
.series-header {
    background: linear-gradient(135deg, #4a41ce 0%, #3127a3 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.15);
}

.series-header-inner {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    gap: 14px;
}

.series-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
}

.series-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.series-header-info {
    flex: 1;
}

.series-header-title {
    font-size: 19px;
    font-weight: 800;
}

.series-header-sub {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.75;
    margin-top: -1px;
}

.series-header-progress {
    display: flex;
    align-items: baseline;
    gap: 2px;
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.shp-done {
    font-size: 20px;
    font-weight: 900;
}

.shp-sep {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.6;
    margin: 0 1px;
}

.shp-total {
    font-size: 14px;
    font-weight: 700;
    opacity: 0.7;
}

.shp-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.6;
    margin-right: 6px;
}

/* Series Grid */
.series-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 20px 24px 52px;
}

@media (max-width: 900px) {
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 500px) {
    .series-grid {
        grid-template-columns: 1fr;
        padding: 16px 14px 40px;
    }

    .series-header-progress {
        display: none;
    }
}

/* Series Card */
.s-card {
    background: #5e6d82;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    animation: cardPop .5s cubic-bezier(.22, 1, .36, 1) both;
    position: relative;
}

/* Stagger series cards */
.s-card:nth-child(3n+1) {
    animation-delay: .03s;
}

.s-card:nth-child(3n+2) {
    animation-delay: .06s;
}

.s-card:nth-child(3n+3) {
    animation-delay: .09s;
}

.s-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.s-card:active {
    transform: translateY(-1px);
    transition-duration: .1s;
}

.s-card-done {
    background: #5a7a6e;
}

/* Card top area */
.s-card-top {
    display: flex;
    align-items: center;
    padding: 14px 14px 10px;
    direction: ltr;
    position: relative;
}

.s-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.s-card-number {
    flex: 1;
    text-align: center;
    font-size: 44px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
    margin: 0 4px;
}

.s-card-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    transition: all .3s;
}

.s-card-check.done {
    background: #2ecc71;
    color: white;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.35);
}

.s-card-check.started {
    background: rgba(243, 156, 18, 0.25);
    color: #f39c12;
}

.s-card-menu {
    position: absolute;
    top: 10px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-family: 'Cairo', sans-serif;
}

.s-card-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Card bottom area */
.s-card-bottom {
    padding: 6px 14px 12px;
    direction: ltr;
}

.s-card-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    text-underline-offset: 3px;
}

.s-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.s-card-score {
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.75);
}

.s-card-dots {
    display: flex;
    gap: 4px;
}

.s-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background .3s;
}

.s-dot.filled {
    background: #f39c12;
    box-shadow: 0 0 4px rgba(243, 156, 18, 0.4);
}

.s-dot.empty {
    background: rgba(255, 255, 255, 0.15);
}

/* ====================================================
   YOUTUBE VIDEOS SECTION
   ==================================================== */

.yt-section {
    padding: 0 28px 52px;
}

@media (max-width: 600px) {
    .yt-section {
        padding: 0 16px 40px;
    }
}

/* Section header */
.yt-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.yt-section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yt-yt-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yt-section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.yt-section-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: -1px;
}

.yt-channel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    background: #ff0000;
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 3px 10px rgba(255, 0, 0, 0.2);
}

.yt-channel-btn:hover {
    background: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.25);
}

/* Video grid */
.yt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

@media (max-width: 900px) {
    .yt-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 500px) {
    .yt-grid {
        grid-template-columns: 1fr;
    }
}

/* Video card */
.yt-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    animation: cardPop .5s cubic-bezier(.22, 1, .36, 1) both;
    display: block;
}

.yt-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Thumbnail */
.yt-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8ecf1;
}

.yt-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}

.yt-card:hover .yt-thumb {
    transform: scale(1.05);
}

/* Play overlay */
.yt-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity .3s;
}

.yt-card:hover .yt-play-overlay {
    opacity: 1;
}

.yt-play-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform .3s;
}

.yt-card:hover .yt-play-btn {
    transform: scale(1.1);
}

/* Card info */
.yt-card-info {
    padding: 14px 16px;
}

.yt-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.yt-card-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

/* ===== Skeleton loading ===== */
.yt-skeleton .yt-thumb-wrap,
.yt-skeleton-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e8ecf1 25%, #f0f3f7 50%, #e8ecf1 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.yt-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8ecf1 25%, #f0f3f7 50%, #e8ecf1 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    margin-bottom: 8px;
}

.yt-skeleton-line.w80 {
    width: 80%;
}

.yt-skeleton-line.w60 {
    width: 60%;
}

@keyframes skeletonPulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== VIDEO PLAYER MODAL ===== */
.yt-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .3s;
}

.yt-modal.open {
    opacity: 1;
}

.yt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.yt-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    transform: scale(0.92) translateY(20px);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.yt-modal.open .yt-modal-content {
    transform: scale(1) translateY(0);
}

.yt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    direction: ltr;
}

.yt-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 12px;
}

.yt-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.yt-modal-close:hover {
    background: #f7f9fb;
    color: var(--text-dark);
}

.yt-modal-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background: #000;
}

.yt-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 600px) {
    .yt-modal-content {
        width: 96%;
        border-radius: 14px;
    }

    .yt-modal-title {
        font-size: 13px;
    }

    .yt-modal-header {
        padding: 12px 14px;
    }
}

/* ====================================================
   FOOTER — redesigned
   ==================================================== */

.site-footer {
    background: #111827;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    direction: ltr;
}

.footer-top-line {
    height: 3px;
    background: linear-gradient(90deg, #4a41ce, #9b8aff, #ffd700, #4a41ce);
    background-size: 300% 100%;
    animation: footerLine 6s linear infinite;
}

@keyframes footerLine {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

/* ── Main grid: brand + 3 link columns ── */
.footer-inner {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 0;
    padding: 48px 40px 36px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Brand column */
.footer-brand-col {
    padding-left: 40px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

/* Link columns */
.footer-links-col {
    padding: 0 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-links-col:last-child {
    border-left: none;
    padding-left: 0;
}

/* ── Brand ── */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #4a41ce, #9b8aff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(74, 65, 206, 0.35);
    flex-shrink: 0;
}

.footer-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.2px;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 22px;
    max-width: 300px;
}

/* ── Social icons ── */
.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all .25s;
}

.footer-social-btn:hover {
    background: rgba(74, 65, 206, 0.25);
    border-color: rgba(74, 65, 206, 0.4);
    color: white;
    transform: translateY(-2px);
}

/* ── Column headings ── */
.footer-col-title {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Links ── */
.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    padding: 5px 0;
    transition: all .2s;
    line-height: 1.4;
}

.footer-link::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: background .2s;
}

.footer-link:hover {
    color: white;
    transform: translateX(-3px);
}

.footer-link:hover::before {
    background: #4a41ce;
}

/* ── Bottom bar ── */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-credit {
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-credit strong {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
}

.footer-heart {
    animation: heartBeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.25); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 36px 24px 28px;
    }

    .footer-brand-col {
        grid-column: 1 / -1;
        padding-left: 0;
        border-left: none;
        padding-bottom: 28px;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .footer-links-col {
        padding: 20px 0;
        border-left: none;
        border-top: none;
    }

    .footer-links-col:nth-child(2) {
        padding-right: 20px;
        border-left: 1px solid rgba(255, 255, 255, 0.07);
    }

    .footer-bottom {
        padding: 16px 24px;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
        padding: 28px 20px 20px;
    }

    .footer-brand-col {
        padding-bottom: 24px;
    }

    .footer-links-col {
        padding: 16px 0 0;
    }

    .footer-links-col:nth-child(2) {
        padding-right: 0;
        border-left: none;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding: 16px 20px;
    }
}


/* ===== WHATSAPP FEEDBACK BUTTON ===== */
.wa-feedback-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px 14px 18px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 60px;
    color: white;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    z-index: 999;
    box-shadow:
        0 6px 28px rgba(37, 211, 102, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all .35s cubic-bezier(.22, 1, .36, 1);
    outline: none;
    overflow: hidden;
    direction: ltr;
    animation: waFeedbackEntrance 0.8s cubic-bezier(.22, 1, .36, 1) 1s both, waAttention 4s ease-in-out 2s infinite;
}

@keyframes waFeedbackEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wa-feedback-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: waShimmer 3s ease-in-out infinite;
}

@keyframes waShimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.wa-feedback-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow:
        0 10px 40px rgba(37, 211, 102, 0.55),
        0 4px 14px rgba(0, 0, 0, 0.15);
}

.wa-feedback-btn:active {
    transform: translateY(-1px) scale(1.01);
}

/* WhatsApp icon */
.wa-feedback-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
    animation: waIconBounce 3s ease-in-out infinite;
}

@keyframes waIconBounce {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.2) rotate(-8deg); }
    30% { transform: scale(1) rotate(0deg); }
}

/* Text */
.wa-feedback-text {
    white-space: nowrap;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Arrow */
.wa-feedback-arrow {
    display: flex;
    align-items: center;
    animation: waArrowSlide 2s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes waArrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
}

/* Pulse rings */
.wa-feedback-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 60px;
    border: 2px solid rgba(37, 211, 102, 0.5);
    animation: waPulse 2.8s ease-in-out infinite;
    pointer-events: none;
}

.wa-feedback-pulse-2 {
    animation-delay: 1.4s;
}

@keyframes waPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.08);
        opacity: 0;
    }
}

@keyframes waAttention {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0,0,0,0.12);
    }
    10% { transform: scale(1.06) rotate(-3deg); }
    20% { transform: scale(1.06) rotate(3deg); }
    30% { transform: scale(1.04) rotate(-2deg); }
    40% { transform: scale(1.04) rotate(2deg); }
    50% {
        transform: scale(1.08) rotate(0deg);
        box-shadow: 0 12px 40px rgba(37, 211, 102, 0.7), 0 4px 16px rgba(0,0,0,0.15);
    }
    70% { transform: scale(1) rotate(0deg); }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .wa-feedback-btn {
        bottom: 16px;
        left: 16px;
        padding: 12px 18px 12px 14px;
        font-size: 12px;
        gap: 8px;
        border-radius: 50px;
    }

    .wa-feedback-icon {
        width: 18px;
        height: 18px;
    }

    .wa-feedback-arrow svg {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 380px) {
    .wa-feedback-text {
        display: none;
    }

    .wa-feedback-arrow {
        display: none;
    }

    .wa-feedback-btn {
        padding: 14px;
        border-radius: 50%;
        width: 52px;
        height: 52px;
        justify-content: center;
        left: 16px;
    }

    .wa-feedback-icon {
        width: 24px;
        height: 24px;
    }
}

/* ====================================================
   CARD UPDATING STATE
   ==================================================== */

.card-updating {
    position: relative;
    cursor: default;
    opacity: 0.88;
}

.card-updating:hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.card-update-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    background: linear-gradient(135deg, rgba(74, 65, 206, 0.92), rgba(155, 138, 255, 0.88));
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 3;
    text-align: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(74, 65, 206, 0.35);
    animation: updateBadgePulse 2.5s ease-in-out infinite;
    font-family: 'Cairo', sans-serif;
    direction: ltr;
}

.card-update-icon {
    font-size: 14px;
    animation: updateSpin 2s linear infinite;
    display: inline-block;
}

@keyframes updateSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes updateBadgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.88; transform: scale(1.015); }
}

/* ====================================================
   INTERACTIVE LESSON READER
   ==================================================== */

/* Lesson Reader Header */
.lesson-reader-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #1f1b3e 50%, #2a1f6e 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lesson-reader-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    max-width: 900px;
    margin: 0 auto;
}

.lesson-reader-back {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all .2s;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.lesson-reader-back:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

.lesson-reader-hinfo {
    flex: 1;
    min-width: 0;
}

.lesson-reader-htitle {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-reader-hsub {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.65;
    margin-top: 2px;
}

/* Progress Ring */
.lesson-reader-progress-ring {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.lesson-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.lesson-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 3;
}

.lesson-ring-fg {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray .6s ease;
}

.lesson-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: white;
}

/* Progress Bar */
.lesson-reader-pbar-wrap {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.lesson-reader-pbar {
    height: 100%;
    border-radius: 0 3px 3px 0;
    transition: width .6s cubic-bezier(.22, 1, .36, 1);
}

/* Lesson Body */
.lesson-reader-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Section Accordion */
.lesson-section {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.06);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all .3s;
    animation: fadeUp .45s cubic-bezier(.22, 1, .36, 1) both;
}

.lesson-section:hover {
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
}

.lesson-section.expanded {
    box-shadow: 0 6px 28px rgba(44, 62, 80, 0.12);
    border-color: rgba(74, 65, 206, 0.2);
}

.lesson-section.read .lesson-section-toggle {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

/* Section Toggle Button */
.lesson-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    text-align: right;
    transition: background .2s;
}

.lesson-section-toggle:hover {
    background: rgba(74, 65, 206, 0.03);
}

.lesson-section-num {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    flex-shrink: 0;
    transition: all .3s;
}

.lesson-section-info {
    flex: 1;
    min-width: 0;
}

.lesson-section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
}

.lesson-section-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: 2px;
}

.lesson-section-icon {
    flex-shrink: 0;
}

.lesson-section-emoji {
    font-size: 22px;
}

.lesson-section-chevron {
    flex-shrink: 0;
    color: var(--text-light);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.lesson-section.expanded .lesson-section-chevron {
    transform: rotate(180deg);
}

/* Section Content */
.lesson-section-content {
    padding: 0 20px 20px;
    animation: fadeUp .3s ease both;
}

/* Section Description */
.lesson-section-desc {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f4ff, #eef2ff);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(74, 65, 206, 0.1);
}

.lesson-desc-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.lesson-section-desc p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-mid);
    line-height: 1.6;
    margin: 0;
}

/* Rules */
.lesson-rules {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.lesson-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fffbeb;
    border-radius: 10px;
    border: 1px solid #fef3c7;
}

.lesson-rule-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

.lesson-rule-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
}

/* Items */
.lesson-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lesson-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #fafbfc;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all .25s;
    animation: fadeUp .3s cubic-bezier(.22, 1, .36, 1) both;
    cursor: default;
}

.lesson-item:hover {
    background: #f5f7fa;
    border-color: rgba(74, 65, 206, 0.15);
    transform: translateX(-4px);
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.06);
}

.lesson-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: transform .2s;
}

.lesson-item:hover .lesson-item-icon {
    transform: scale(1.1);
}

.lesson-item-body {
    flex: 1;
    min-width: 0;
}

.lesson-item-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.lesson-item-desc {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    line-height: 1.6;
}

/* Mark as Read Button */
.lesson-mark-read-btn {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    border-radius: 12px;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.lesson-mark-read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.lesson-mark-read-btn:active {
    transform: translateY(0);
}

/* Completion Banner */
.lesson-complete-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #6ee7b7;
    border-radius: 16px;
    animation: fadeUp .5s .2s cubic-bezier(.22, 1, .36, 1) both;
}

.lesson-complete-icon {
    font-size: 36px;
    animation: bounceBadge 2s ease-in-out infinite;
}

.lesson-complete-text {
    font-size: 16px;
    font-weight: 800;
    color: #065f46;
}

/* Mobile Responsive */
@media (max-width: 700px) {
    .lesson-reader-header-inner {
        padding: 14px 16px;
        gap: 10px;
    }

    .lesson-reader-htitle {
        font-size: 14px;
    }

    .lesson-reader-body {
        padding: 14px 12px 50px;
        gap: 10px;
    }

    .lesson-section-toggle {
        padding: 14px 14px;
        gap: 10px;
    }

    .lesson-section-num {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .lesson-section-title {
        font-size: 14px;
    }

    .lesson-section-emoji {
        font-size: 18px;
    }

    .lesson-section-content {
        padding: 0 14px 14px;
    }

    .lesson-item {
        padding: 12px;
        gap: 10px;
    }

    .lesson-item-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .lesson-item-title {
        font-size: 13px;
    }

    .lesson-item-desc {
        font-size: 12px;
    }

    .lesson-reader-progress-ring {
        width: 38px;
        height: 38px;
    }
}

/* ===== TRAFFIC SIGNS â€” Ř§Ů„ŘŞŘ´ŮŮŠŘ± Ř§Ů„Ř·Ř±Ů‚ŮŠ ===== */

/* Header */
.signs-header {
    background: linear-gradient(135deg, #1f1b63 0%, #3127a3 50%, #4a41ce 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 4px 20px rgba(26, 58, 108, 0.25);
}

.signs-header-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.signs-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.signs-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.signs-header-info {
    flex: 1;
}

.signs-header-title {
    font-size: 18px;
    font-weight: 800;
    color: white;
}

.signs-header-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.signs-header-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

/* Category Grid */
.signs-grid {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 600px) {
    .signs-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px 16px 36px;
        gap: 12px;
    }
}

@media (max-width: 380px) {
    .signs-grid {
        grid-template-columns: 1fr;
    }
}

/* Category Card */
.sign-cat-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    animation: cardPop .5s cubic-bezier(.22, 1, .36, 1) both;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sign-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.sign-cat-card:active {
    transform: translateY(-2px);
    transition-duration: .1s;
}

/* Card icon area */
.sign-cat-icon-wrap {
    padding: 20px 16px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sign-cat-svg {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.sign-cat-card:hover .sign-cat-svg {
    transform: scale(1.1);
}

.sign-cat-svg svg {
    width: 100%;
    height: 100%;
}

/* Card body */
.sign-cat-body {
    padding: 0 14px 16px;
    text-align: center;
}

.sign-cat-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 4px;
}

.sign-cat-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}

/* Menu button */
.sign-cat-menu {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    opacity: 0;
}

.sign-cat-card:hover .sign-cat-menu {
    opacity: 1;
}

.sign-cat-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ===== TRAFFIC SIGNS DETAIL VIEW ===== */

.signs-detail-header {
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.signs-detail-header-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.signs-detail-back {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.signs-detail-back:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.signs-detail-hinfo {
    flex: 1;
}

.signs-detail-htitle {
    font-size: 18px;
    font-weight: 800;
    color: white;
}

.signs-detail-hsub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

.signs-detail-svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.signs-detail-svg svg {
    width: 100%;
    height: 100%;
}

/* Description */
.signs-detail-desc {
    max-width: 700px;
    margin: 20px auto 0;
    padding: 0 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: white;
    margin-left: auto;
    margin-right: auto;
    border-radius: 14px;
    padding: 16px 18px;
    max-width: 660px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: fadeUp .4s cubic-bezier(.22, 1, .36, 1) both;
}

.signs-detail-desc-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.signs-detail-desc-text {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-mid);
    line-height: 1.7;
    margin: 0;
}

/* Signs List */
.signs-detail-list {
    max-width: 660px;
    margin: 16px auto 0;
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.signs-detail-item {
    background: white;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all .25s cubic-bezier(.22, 1, .36, 1);
    animation: oSlide .4s cubic-bezier(.22, 1, .36, 1) both;
}

.signs-detail-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.signs-detail-item-num {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.sign-img-container {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: white;
}

.sign-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sign-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.sign-img-placeholder-svg {
    width: 32px;
    height: 32px;
    opacity: 0.6;
}

.signs-detail-item-body {
    flex: 1;
    min-width: 0;
}

.signs-detail-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.signs-detail-item-desc {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.5;
}

/* Footer banner */
.signs-detail-footer {
    max-width: 660px;
    margin: 8px auto 32px;
    padding: 0 20px;
}

.signs-detail-footer {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(74, 65, 206, 0.1);
    animation: fadeUp .4s .2s cubic-bezier(.22, 1, .36, 1) both;
}

.signs-detail-footer-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.signs-detail-footer-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    line-height: 1.6;
}

/* Mobile adjustments */
@media (max-width: 500px) {

    .signs-header-inner,
    .signs-detail-header-inner {
        padding: 14px 16px;
    }

    .signs-header-title,
    .signs-detail-htitle {
        font-size: 16px;
    }

    .signs-detail-desc {
        margin: 14px 16px 0;
        padding: 14px;
    }

    .signs-detail-list {
        padding: 0 16px 16px;
        margin-top: 12px;
        gap: 8px;
    }

    .signs-detail-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .sign-img-container {
        width: 42px;
        height: 42px;
    }

    .sign-img-placeholder-svg {
        width: 26px;
        height: 26px;
    }

    .signs-detail-item-num {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    .signs-detail-item-title {
        font-size: 13px;
    }

    .signs-detail-item-desc {
        font-size: 12px;
    }

    .sign-cat-svg {
        width: 46px;
        height: 46px;
    }

    .sign-cat-title {
        font-size: 12.5px;
    }

    .signs-detail-footer {
        margin: 8px 16px 28px;
    }
}

/* ===== SERIES QUIZ â€” PREMIUM PERMINOU DESIGN ===== */

.sq-wrap {
    background: linear-gradient(155deg, #4a3675 0%, #5e468a 25%, #7b5ea8 50%, #6a4f95 75%, #4a3675 100%);
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    direction: ltr;
    font-family: 'Cairo', sans-serif;
    position: relative;
    overflow: hidden;
}

.sq-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.sq-wrap>* {
    position: relative;
    z-index: 1;
}

/* ===== TOP BAR ===== */
.sq-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 18px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
}

.sq-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sq-topbar-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4a41ce, #9b8aff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(74, 65, 206, 0.35);
}

.sq-topbar-logo svg {
    width: 18px;
    height: 18px;
    color: white;
}

.sq-topbar-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.sq-topbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.sq-series-label {
    color: #ffd700;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.sq-series-label strong {
    font-size: 18px;
}

.sq-topbar-stats {
    display: flex;
    gap: 6px;
    align-items: center;
}

.sq-stat-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(6px);
}

.sq-stat-pill.correct {
    background: rgba(39, 174, 96, 0.25);
    border: 1px solid rgba(39, 174, 96, 0.4);
    color: #6deca0;
}

.sq-stat-pill.wrong {
    background: rgba(231, 76, 60, 0.25);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #f5a4a0;
}

.sq-stat-pill.neutral {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.sq-stat-icon {
    font-size: 11px;
    font-weight: 900;
}

/* ===== MAIN LAYOUT ===== */
.sq-main {
    flex: 1;
    display: flex;
    gap: 6px;
    padding: 6px 8px;
    min-height: 0;
}

/* ===== LEFT SIDEBAR ===== */
.sq-left-sidebar {
    width: 52px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    align-items: center;
}

.sq-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sq-nav-btn svg {
    width: 18px;
    height: 18px;
}

.sq-nav-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.sq-sidebar-sep {
    width: 28px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2px 0;
}

.sq-nav-skip {
    margin-top: auto;
}

/* Timer in sidebar */
.sq-sidebar-timer {
    margin: 4px 0;
}

.sq-timer-ring-wrap {
    width: 44px;
    height: 44px;
    position: relative;
}

.sq-timer-ring-wrap svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.sq-timer-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.sq-timer-fill-ring {
    fill: none;
    stroke: #2ecc71;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
    filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.4));
}

.sq-timer-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.sq-timer-ring-wrap.danger {
    animation: timerAlarm 0.6s ease-in-out infinite;
}

.sq-timer-ring-wrap.warning {
    animation: timerWarn 1s ease-in-out infinite;
}

@keyframes timerAlarm {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 0px rgba(231, 76, 60, 0));
    }
    20% {
        transform: scale(1.18) rotate(-4deg);
        filter: drop-shadow(0 0 12px rgba(231, 76, 60, 0.9));
    }
    40% {
        transform: scale(1.18) rotate(4deg);
        filter: drop-shadow(0 0 16px rgba(231, 76, 60, 1));
    }
    60% {
        transform: scale(1.12) rotate(-3deg);
        filter: drop-shadow(0 0 10px rgba(231, 76, 60, 0.7));
    }
    80% {
        transform: scale(1.12) rotate(3deg);
        filter: drop-shadow(0 0 14px rgba(231, 76, 60, 0.8));
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 0px rgba(231, 76, 60, 0));
    }
}

@keyframes timerWarn {
    0%, 100% {
        filter: drop-shadow(0 0 0px rgba(230, 126, 34, 0));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(230, 126, 34, 0.7));
    }
}

.sq-nav-pause {
    margin-top: 4px;
}

/* ===== CENTER CONTENT ===== */
.sq-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 0;
}

.sq-image-panel {
    flex: 1;
    background: linear-gradient(145deg, #1a2a3e, #243b55);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sq-scenario-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sq-scenario-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    position: relative;
}

.sq-ph-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(74, 65, 206, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
}

.sq-ph-icon svg {
    opacity: 0.3;
    stroke: rgba(255, 255, 255, 0.6);
}

.sq-ph-text {
    font-size: 18px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

.sq-ph-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
}

.sq-q-float-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.sq-q-float-badge span {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.6;
}

/* ===== QUESTION PANEL ===== */
.sq-question-panel {
    background: linear-gradient(180deg, #f5f0e1, #ede6d0);
    border-radius: 12px;
    padding: 18px 22px;
    border: 2px solid #d4c9a8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
}

.sq-q-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(196, 184, 150, 0.4);
}

.sq-q-text {
    font-size: 17px;
    font-weight: 800;
    color: #2c3e50;
    line-height: 1.7;
}

.sq-multi-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(74, 65, 206, 0.08);
    border: 1px solid rgba(74, 65, 206, 0.15);
    font-size: 11px;
    font-weight: 700;
    color: #4a41ce;
    margin-bottom: 8px;
}

.sq-options-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sq-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid rgba(196, 184, 150, 0.5);
}

.sq-option-row:last-child {
    border-bottom: none;
}

.sq-option-row:hover {
    background: rgba(74, 65, 206, 0.06);
}

.sq-opt-num {
    font-size: 18px;
    font-weight: 900;
    color: #5a6a7d;
    min-width: 22px;
    text-align: center;
}

.sq-opt-dash {
    flex: 1;
    height: 2px;
    background: repeating-linear-gradient(90deg, #c4b896 0, #c4b896 6px, transparent 6px, transparent 10px);
    opacity: 0.6;
}

.sq-opt-text {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
}

.sq-option-row.selected {
    background: rgba(74, 65, 206, 0.1);
    border-bottom-color: #4a41ce;
}

.sq-option-row.selected .sq-opt-num {
    color: #4a41ce;
}

.sq-option-row.selected .sq-opt-dash {
    background: repeating-linear-gradient(90deg, #4a41ce 0, #4a41ce 6px, transparent 6px, transparent 10px);
    opacity: 0.8;
}

.sq-option-row.correct {
    background: rgba(39, 174, 96, 0.12);
    border-bottom-color: #27ae60;
}

.sq-option-row.correct .sq-opt-num {
    color: #27ae60;
}

.sq-option-row.wrong {
    background: rgba(231, 76, 60, 0.1);
    border-bottom-color: #e74c3c;
}

.sq-option-row.wrong .sq-opt-num {
    color: #e74c3c;
}

.sq-option-row.wrong .sq-opt-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.sq-explanation {
    margin-top: 14px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.08), rgba(39, 174, 96, 0.04));
    border-radius: 10px;
    border-right: 4px solid #27ae60;
    font-size: 13px;
    font-weight: 600;
    color: #27ae60;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: fadeUp 0.3s ease;
    line-height: 1.6;
}

.sq-explanation svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #27ae60;
}

/* ===== RIGHT SIDEBAR ===== */
.sq-right-sidebar {
    width: 170px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sq-progress-wrap {
    width: 100%;
    overflow: hidden;
}

.sq-progress-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    width: 100%;
    max-height: 130px;
    overflow-y: auto;
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sq-pbox {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    border-radius: 4px;
    background: linear-gradient(145deg, #b03a2e, #922b21);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.25s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sq-pbox.active {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5), 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.sq-pbox.correct {
    background: linear-gradient(145deg, #27ae60, #1e8449);
}

.sq-pbox.wrong {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
}

/* Action Buttons */
.sq-action-btn {
    width: 100%;
    padding: 9px 0;
    border-radius: 22px;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.22, 1, .36, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.sq-action-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.sq-corriger {
    background: linear-gradient(180deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.sq-corriger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.45);
}

.sq-valider {
    background: linear-gradient(180deg, #27ae60, #1e8449);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.sq-valider:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.45);
}

.sq-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Numbered Answer Buttons */
.sq-answer-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.sq-num-btn {
    width: 100%;
    padding: 11px 0;
    border-radius: 22px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, rgba(130, 110, 175, 0.8), rgba(100, 80, 145, 0.9));
    color: white;
    font-size: 20px;
    font-weight: 900;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
}

.sq-num-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.sq-num-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    background: linear-gradient(180deg, rgba(140, 120, 185, 0.9), rgba(110, 90, 155, 1));
    border-color: rgba(255, 255, 255, 0.3);
}

.sq-num-btn.selected {
    background: linear-gradient(180deg, #5a4fd4, #3d33b0);
    border-color: rgba(74, 65, 206, 0.6);
    box-shadow: 0 4px 18px rgba(74, 65, 206, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.03);
}

.sq-num-btn.correct {
    background: linear-gradient(180deg, #27ae60, #1e8449) !important;
    border-color: #27ae60 !important;
    box-shadow: 0 4px 18px rgba(39, 174, 96, 0.45) !important;
}

.sq-num-btn.wrong {
    background: linear-gradient(180deg, #e74c3c, #c0392b) !important;
    border-color: #e74c3c !important;
    box-shadow: 0 4px 18px rgba(231, 76, 60, 0.45) !important;
}

/* Category Badge */
.sq-cat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 14px;
    background: linear-gradient(145deg, rgba(74, 65, 206, 0.5), rgba(59, 50, 180, 0.5));
    backdrop-filter: blur(6px);
    border-radius: 10px;
    color: white;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sq-cat-ar {
    font-size: 12px;
    font-weight: 800;
}

.sq-cat-fr {
    font-size: 10px;
    opacity: 0.75;
}

/* Brand Card */
.sq-brand-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(145deg, #6a5ff0, #4a41ce);
    border-radius: 10px;
    width: 100%;
    box-shadow: 0 3px 12px rgba(74, 65, 206, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sq-brand-mini-logo {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sq-brand-mini-logo svg {
    width: 16px;
    height: 16px;
    color: white;
}

.sq-brand-info {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    flex: 1;
}

.sq-brand-title {
    font-size: 9px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.sq-brand-subtitle {
    font-size: 11px;
    font-weight: 900;
    color: #fff700;
}

.sq-brand-yr {
    font-size: 16px;
    font-weight: 900;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Empty */
.sq-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== RESPONSIVE â€” TABLET ===== */
@media (max-width: 900px) {
    .sq-main {
        flex-direction: column;
    }

    .sq-left-sidebar {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        padding: 6px 12px;
        gap: 8px;
    }

    .sq-sidebar-sep {
        width: 1px;
        height: 28px;
    }

    .sq-nav-skip {
        margin-top: 0;
        margin-right: auto;
    }

    .sq-sidebar-timer {
        margin: 0 4px;
    }

    .sq-nav-pause {
        margin-top: 0;
    }

    .sq-right-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 10px 12px;
    }

    .sq-progress-wrap {
        order: -1;
        width: 100%;
    }

    .sq-progress-grid {
        grid-template-columns: repeat(10, 1fr);
        max-height: none;
    }

    .sq-action-btn {
        flex: 1;
        min-width: 110px;
    }

    .sq-answer-stack {
        flex-direction: row;
        flex: 2;
    }

    .sq-num-btn {
        padding: 9px 0;
        font-size: 17px;
    }

    .sq-cat-badge {
        display: none;
    }

    .sq-brand-card {
        display: none;
    }

    .sq-topbar-center {
        position: static;
        transform: none;
    }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 600px) {
    .sq-wrap {
        height: auto;
        min-height: 100vh;
        max-height: none;
        overflow-y: auto;
    }

    .sq-topbar {
        padding: 6px 12px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sq-topbar-brand {
        display: none;
    }

    .sq-progress-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .sq-center {
        overflow-y: visible;
        min-height: auto;
    }

    .sq-image-panel {
        min-height: 150px;
        flex: none;
        height: 180px;
    }

    .sq-question-panel {
        padding: 14px 16px;
        overflow: visible;
    }

    .sq-q-text {
        font-size: 15px;
    }

    .sq-opt-text {
        font-size: 13px;
    }

    .sq-left-sidebar {
        flex-wrap: wrap;
    }

    .sq-nav-btn {
        width: 36px;
        height: 36px;
    }

    .sq-timer-ring-wrap {
        width: 38px;
        height: 38px;
    }

    .sq-stat-pill {
        padding: 3px 7px;
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .sq-main {
        padding: 4px;
    }

    .sq-progress-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .sq-answer-stack {
        gap: 4px;
    }

    .sq-num-btn {
        padding: 7px 0;
        font-size: 15px;
    }

    .sq-image-panel {
        min-height: 160px;
    }

    .sq-opt-dash {
        display: none;
    }
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 0 28px 52px;
}

@media (max-width: 600px) {
    .faq-section {
        padding: 0 16px 40px;
    }
}

.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.faq-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-icon svg {
    width: 22px;
    height: 22px;
    color: var(--blue);
}

.faq-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}

.faq-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: -1px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 0 1px 4px rgba(44, 62, 80, 0.04);
}

.faq-item:hover {
    border-color: rgba(74, 65, 206, 0.25);
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08);
}

.faq-item.open {
    border-color: rgba(74, 65, 206, 0.35);
    box-shadow: 0 6px 24px rgba(74, 65, 206, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--blue);
}

.faq-item.open .faq-question {
    color: var(--blue);
}

.faq-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f4f8;
    transition: all 0.35s cubic-bezier(.22, 1, .36, 1);
}

.faq-chevron svg {
    width: 16px;
    height: 16px;
    color: var(--text-mid);
    transition: color 0.2s;
}

.faq-item.open .faq-chevron {
    background: linear-gradient(135deg, #4a41ce, #9b8aff);
    transform: rotate(180deg);
}

.faq-item.open .faq-chevron svg {
    color: white;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(.22, 1, .36, 1), padding 0.3s;
    padding: 0 22px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 22px 20px;
}

.faq-answer p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-mid);
    line-height: 1.85;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

@media (max-width: 600px) {
    .faq-question {
        font-size: 14px;
        padding: 16px 18px;
        gap: 12px;
    }

    .faq-answer {
        padding: 0 18px;
    }

    .faq-item.open .faq-answer {
        padding: 0 18px 18px;
    }

    .faq-answer p {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .faq-question {
        font-size: 13px;
        padding: 14px 14px;
    }

    .faq-chevron {
        width: 28px;
        height: 28px;
    }

    .faq-chevron svg {
        width: 14px;
        height: 14px;
    }
}

/* ===== PDF VIEWER MODAL ===== */
.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.pdf-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pdf-modal-content {
    position: relative;
    width: 92%;
    max-width: 900px;
    height: 90vh;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(.22, 1, .36, 1);
}

.pdf-modal.open .pdf-modal-content {
    transform: translateY(0) scale(1);
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #4a41ce, #9b8aff);
    color: white;
    flex-shrink: 0;
}

.pdf-modal-title {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pdf-modal-download {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.pdf-modal-download:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.pdf-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pdf-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.pdf-modal-body {
    flex: 1;
    min-height: 0;
}

.pdf-modal-body object,
.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 600px) {
    .pdf-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-width: none;
    }

    .pdf-modal-title {
        font-size: 13px;
    }

    .pdf-modal-header {
        padding: 12px 14px;
    }
}

/* ===== PERFORMANCE: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-orb,
    .hero-float,
    .hero-image-glow,
    .hero-badge-dot,
    .nav-logo::after {
        animation: none !important;
    }
}

/* ===== PERFORMANCE: Content Visibility ===== */
.faq-section,
.site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* ===== PERFORMANCE: GPU Compositing Hints ===== */
.hero-orb,
.hero-float,
.card {
    will-change: transform;
}

/* ===== PERFORMANCE: Toast visibility ===== */
.toast-visible {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

/* ===== TRUST STRIP ===== */
.trust-strip {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

.trust-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: default;
    transition: color 0.2s ease;
}

.trust-item:hover {
    color: var(--blue);
}

.trust-icon-box {
    width: 36px;
    height: 36px;
    background: #edf2ff;
    color: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(74, 65, 206, 0.08);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, background-color 0.25s ease;
}

.trust-icon-box svg {
    width: 16px;
    height: 16px;
}

.trust-item:hover .trust-icon-box {
    transform: scale(1.1) translateY(-1px);
    background: var(--blue);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(74, 65, 206, 0.25);
}

.trust-item-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
}

@media (max-width: 768px) {
    .trust-strip {
        padding: 14px 16px;
    }
    .trust-strip-inner {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }
    .trust-item-sep {
        display: none;
    }
    .trust-item {
        width: 100%;
        justify-content: center;
    }
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    padding: 36px 28px 20px;
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 18px;
}

.how-step {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-step:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.how-step-number {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: var(--text-white);
    font-size: 18px;
    font-weight: 800;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(74, 65, 206, 0.25);
}

.how-step-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.how-step-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
}

.how-step-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-mid);
}

@media (max-width: 900px) {
    .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}
@media (max-width: 600px) {
    .how-it-works {
        padding: 28px 16px 16px;
    }
}
@media (max-width: 500px) {
    .how-step {
        padding: 24px 20px;
    }
}

/* ===== MINI TEST EMBED ===== */
.mini-test-section {
    padding: 20px 28px 52px;
}

.mini-test-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
}

.mini-test-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.mini-test-header {
    text-align: center;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.mini-test-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.mini-test-subtitle {
    font-size: 14px;
    color: var(--text-mid);
}

.mini-test-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 10px;
}

.mini-test-progress-bar-bg {
    height: 6px;
    background: #edf2ff;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}

.mini-test-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    width: 20%;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mini-test-image-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.mini-test-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.mini-test-question {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.mini-test-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mini-test-option {
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
    font-family: inherit;
}

.mini-test-option:hover:not(.checked) {
    border-color: var(--blue-light);
    background: #f5f8ff;
    transform: translateY(-1px);
}

.mini-test-option.selected {
    border-color: var(--blue);
    background: #edf2ff;
    color: var(--blue);
}

.mini-test-option.correct {
    border-color: var(--green);
    background: #e8f8f0;
    color: var(--green);
}

.mini-test-option.incorrect {
    border-color: var(--red);
    background: #fdf2f2;
    color: var(--red);
}

.mini-test-feedback {
    background: #edf2ff;
    border-left: 4px solid var(--blue);
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 24px;
    display: none;
    text-align: left;
}

.mini-test-feedback.correct-feedback {
    background: #e8f8f0;
    border-left-color: var(--green);
}

.mini-test-feedback.incorrect-feedback {
    background: #fdf2f2;
    border-left-color: var(--red);
}

.mini-test-actions {
    display: flex;
    justify-content: flex-end;
}

.mini-test-btn {
    padding: 12px 28px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 65, 206, 0.2);
    transition: all 0.2s;
    font-family: inherit;
}

.mini-test-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(74, 65, 206, 0.3);
}

.mini-test-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results styles */
.mini-test-result-view {
    text-align: center;
    padding: 20px 0;
}

.mini-test-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #edf2ff;
    color: var(--blue);
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 4px 16px rgba(74, 65, 206, 0.15);
}

.mini-test-result-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 28px;
}

@media (max-width: 600px) {
    .mini-test-section {
        padding: 10px 16px 40px;
    }
}
@media (max-width: 500px) {
    .mini-test-card {
        padding: 24px;
    }
    .mini-test-title {
        font-size: 18px;
    }
    .mini-test-question {
        font-size: 16px;
    }
}

/* ===== TOPIC CARDS SECTION ===== */
.topic-cards-section {
    padding: 20px 28px 52px;
}

.topic-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 24px;
}

.topic-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(74, 65, 206, 0.15);
}

.topic-card:hover::before {
    opacity: 1;
}

.topic-card-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #edf2ff;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    transition: all 0.3s ease;
}

.topic-card:hover .topic-card-icon-wrap {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: white;
    box-shadow: 0 6px 16px rgba(74, 65, 206, 0.25);
}

.topic-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.topic-card-text {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.topic-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: gap 0.2s ease;
    font-family: inherit;
}

.topic-card:hover .topic-card-btn {
    gap: 12px;
}

@media (max-width: 900px) {
    .topic-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .topic-cards-section {
        padding: 10px 16px 40px;
    }
}

/* --- Cookie Consent Banner Styles --- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    width: calc(100% - 48px);
    max-width: 1152px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.cookie-banner.cookie-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.cookie-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.cookie-text-wrap {
    flex: 1;
}

.cookie-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.cookie-desc {
    font-size: 13.5px;
    color: var(--text-mid);
    line-height: 1.5;
}

.cookie-desc a {
    color: var(--blue);
    text-decoration: underline;
    font-weight: 700;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    border: none;
}

.cookie-decline-btn {
    background: #edf2ff;
    color: var(--blue);
}

.cookie-decline-btn:hover {
    background: #e0e8ff;
}

.cookie-accept-btn {
    background: var(--blue);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 65, 206, 0.2);
}

.cookie-accept-btn:hover {
    background: var(--blue-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 65, 206, 0.3);
}

@media (max-width: 900px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 500px) {
    .cookie-banner {
        bottom: 16px;
        left: 16px;
        right: 16px;
        padding: 16px;
    }
    .cookie-buttons {
        flex-direction: column-reverse;
        width: 100%;
    }
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}