
/* ===== Traffic Signs Test â€” Creative Educational UI ===== */

:root {
    --bg: #e8ecf1;
    --card-bg: #ffffff;
    --footer-bg: #606d80;
    --blue: #3a7bd5;
    --blue-light: #5a9be6;
    --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);
    }
}

/* ===== TOP ANNOUNCEMENT BAR ===== */
.top-announcement-bar {
    background: linear-gradient(90deg, #071938 0%, #0e2d63 30%, #1a56a8 65%, #0b224d 100%);
    color: #ffffff;
    font-family: 'Cairo', system-ui, sans-serif;
    position: relative;
    z-index: 70;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.tab-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    direction: rtl;
    text-align: right;
}

.tab-content {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    justify-content: flex-start;
}

.tab-badge {
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.tab-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
    text-align: right;
}

.tab-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25D366;
    color: #ffffff !important;
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 16px;
    border-radius: 50px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-cta:hover {
    background: #20ba56;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.5);
    color: #ffffff !important;
}

.tab-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.tab-cta:hover svg {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .tab-inner {
        padding: 7px 16px;
        gap: 10px;
        text-align: right;
    }
    .tab-text {
        font-size: 12px;
    }
    .tab-badge {
        font-size: 11px;
        padding: 2px 8px;
    }
    .tab-cta {
        padding: 4px 12px;
        font-size: 11.5px;
    }
}

@media (max-width: 540px) {
    .tab-inner {
        padding: 6px 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        text-align: right;
    }
    .tab-content {
        flex: 1;
        min-width: 0;
        gap: 6px;
        text-align: right;
        justify-content: flex-start;
    }
    .tab-badge {
        display: none;
    }
    .tab-text {
        font-size: 11.5px;
        line-height: 1.35;
        text-align: right;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .tab-cta {
        padding: 4px 10px;
        font-size: 11px;
        gap: 3px;
        flex-shrink: 0;
    }
    .tab-cta svg {
        width: 12px;
        height: 12px;
    }
}

/* ===== 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, #3a7bd5, #00d2ff);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(58, 123, 213, 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 !important;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 3px 10px rgba(58, 123, 213, 0.25);
    transition: all .25s;
    margin-right: 8px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(58, 123, 213, 0.3);
    color: white !important;
}

/* ===== 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, #0a2e5c 0%, #1a56a8 30%, #2e86de 60%, #1a56a8 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: #1a56a8;
    font-size: 15px;
    font-weight: 800;
    padding: 14px 30px;
    border-radius: 14px;
    border: 2px solid rgba(255, 215, 0, 0.7);
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(255, 215, 0, 0.4);
    transition: all .3s cubic-bezier(.22, 1, .36, 1);
    position: relative;
    overflow: hidden;
    animation: ctaPulse 2.5s infinite ease-in-out;
}

@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(255, 215, 0, 0.4);
        border-color: rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25), 0 0 20px 6px rgba(255, 215, 0, 0.95);
        border-color: rgba(255, 165, 0, 1);
    }
}

.hero-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(58, 123, 213, 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.25), 0 0 25px 8px rgba(255, 215, 0, 0.95);
    border-color: rgba(255, 165, 0, 1);
    animation-play-state: paused;
}

.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: 52px;
    height: 52px;
    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: 18px;
    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: #1a56a8;
    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;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.section-label .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue);
}

.section-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #d5dce6;
    color: #1a56a8 !important;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.05);
    transition: all 0.25s ease;
}

.section-app-btn:hover {
    background: #1a56a8;
    color: #ffffff !important;
    border-color: #1a56a8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 168, 0.2);
}

/* ===== 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: rtl;
}

.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(58, 123, 213, 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: #3a7bd5;
    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: #3a7bd5;
    transition: color 0.5s ease;
    font-family: 'Cairo', sans-serif;
}

.q-timer-fill {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #3a7bd5, #5a9be6);
    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(58, 123, 213, .12);
}

.opt.selected .opt-ltr {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
    box-shadow: 0 3px 10px rgba(58, 123, 213, .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(58, 123, 213, .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(58, 123, 213, .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);
}

.btn-app-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a56a8 0%, #0d3b66 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14.5px;
    font-family: 'Cairo', sans-serif;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(26, 86, 168, 0.25);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-app-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(26, 86, 168, 0.38);
    color: #ffffff !important;
}

/* ===== 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: #3a7bd5;
}

.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(58, 123, 213, .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(58, 123, 213, 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(58, 123, 213, 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, #3a7bd5 0%, #2c5faa 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;
}

.exam-app-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-decoration: none !important;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.exam-app-header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    color: #ffffff !important;
}

@media (max-width: 500px) {
    .exam-app-header-btn {
        padding: 6px 12px;
        font-size: 12px;
        gap: 5px;
    }
}

/* 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: rtl;
    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: rtl;
}

.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);
}

/* ===== EXAM LOCKED CARDS & MODAL ===== */
.s-card.s-card-locked {
    position: relative;
    cursor: pointer;
}

.s-card.s-card-locked:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.s-card-lock-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffd700;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 215, 0, 0.35);
    z-index: 2;
}

.s-card-check.locked {
    background: rgba(255, 215, 0, 0.18) !important;
    border: 1px solid rgba(255, 215, 0, 0.4) !important;
    color: #ffd700 !important;
}

.exam-lock-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    opacity: 0;
    animation: elmFadeIn 0.25s ease forwards;
    direction: rtl;
    font-family: 'Cairo', system-ui, sans-serif;
}

.exam-lock-modal-content {
    background: #ffffff;
    border-radius: 18px;
    max-width: 360px;
    width: 90%;
    padding: 24px 20px 20px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    text-align: center;
    transform: scale(0.92);
    animation: elmPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes elmFadeIn {
    to { opacity: 1; }
}

@keyframes elmPopIn {
    to { transform: scale(1); }
}

.elm-close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.elm-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.elm-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a56a8 0%, #0d2757 100%);
    color: #ffd700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
    box-shadow: 0 4px 14px rgba(26, 86, 168, 0.25);
}

.elm-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.35;
}

.elm-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 18px;
}

.elm-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elm-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #25D366 0%, #1da851 100%);
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none !important;
    box-shadow: 0 3px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.elm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(37, 211, 102, 0.45);
    background: linear-gradient(135deg, #20ba56 0%, #169345 100%);
}

/* ====================================================
   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: rtl;
}

.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 (Managed by css/site-layout.css)
   ==================================================== */





/* ====================================================
   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(26, 86, 168, 0.92), rgba(0, 210, 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(58, 123, 213, 0.35);
    animation: updateBadgePulse 2.5s ease-in-out infinite;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.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%, #16213e 50%, #0f3460 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(58, 123, 213, 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(58, 123, 213, 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(58, 123, 213, 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(58, 123, 213, 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, #1a3a6c 0%, #2e6db4 50%, #3a7bd5 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(58, 123, 213, 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: rtl;
    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, #3a7bd5, #00d2ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(58, 123, 213, 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;
    flex-direction: column;
    gap: 6px;
    padding: 6px 8px;
    min-height: 0;
}

.sq-columns-wrap {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    gap: 6px;
}

/* ===== 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(58, 123, 213, 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(58, 123, 213, 0.08);
    border: 1px solid rgba(58, 123, 213, 0.15);
    font-size: 11px;
    font-weight: 700;
    color: #3a7bd5;
    margin-bottom: 8px;
}

.sq-options-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Sub-question groups */
.sq-subq-group {
    margin-bottom: 10px;
    width: 100%;
}
.sq-subq-group:last-child {
    margin-bottom: 0;
}
.sq-subq-label {
    font-size: 15px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 4px;
    padding-right: 2px;
    line-height: 1.6;
}

.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(58, 123, 213, 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(58, 123, 213, 0.1);
    border-bottom-color: #3a7bd5;
}

.sq-option-row.selected .sq-opt-num {
    color: #3a7bd5;
}

.sq-option-row.selected .sq-opt-dash {
    background: repeating-linear-gradient(90deg, #3a7bd5 0, #3a7bd5 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, #4a90d9, #357abd);
    border-color: rgba(74, 144, 217, 0.6);
    box-shadow: 0 4px 18px rgba(58, 123, 213, 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, 144, 217, 0.5), rgba(53, 122, 189, 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, #00bcd4, #0097a7);
    border-radius: 10px;
    width: 100%;
    box-shadow: 0 3px 12px rgba(0, 188, 212, 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-columns-wrap {
        flex-direction: column;
        gap: 6px;
    }

    .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: 120px;
    }

    .sq-answer-stack {
        width: 100%;
        flex: none;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        margin-bottom: 6px;
    }

    .sq-num-btn {
        padding: 9px 0;
        font-size: 17px;
    }

    .sq-cat-badge {
        display: none;
    }

    .sq-brand-card {
        display: none;
    }

    .sq-subq-label {
        font-size: 13px;
    }

    .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-main {
        flex: none;
        height: auto;
    }

    .sq-columns-wrap {
        flex: none;
        height: auto;
    }

    .sq-center {
        flex: none;
        height: auto;
        overflow-y: visible;
        min-height: auto;
    }

    .sq-image-panel {
        height: auto;
        min-height: auto;
        flex: none;
    }

    .sq-scenario-img {
        width: 100%;
        height: auto;
        display: block;
    }

    .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: auto;
    }

    .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(58, 123, 213, 0.25);
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08);
}

.faq-item.open {
    border-color: rgba(58, 123, 213, 0.35);
    box-shadow: 0 6px 24px rgba(58, 123, 213, 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, #3a7bd5, #00d2ff);
    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, #3a7bd5, #00d2ff);
    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;
}

/* ===== QUIZ EBOOK AD BANNER ===== */
.sq-ebook-ad-banner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a2332 0%, #1a56a8 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    padding: 8px 14px;
    text-decoration: none;
    color: white;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    direction: rtl;
    margin-top: 2px;
}
.sq-ebook-ad-banner:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 10px rgba(58, 123, 213, 0.3);
}
.sq-eab-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.sq-eab-badge {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.sq-eab-text {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}
.sq-eab-cta {
    background: #ffd700;
    color: #0f3060;
    font-size: 10.5px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    margin-right: 12px;
    transition: background 0.2s;
}
.sq-ebook-ad-banner:hover .sq-eab-cta {
    background: #ffa500;
}
@media (max-width: 550px) {
    .sq-ebook-ad-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px;
    }
    .sq-eab-content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
        width: 100%;
    }
    .sq-eab-text {
        white-space: normal;
        font-size: 11px;
        text-align: center;
        overflow: visible;
        text-overflow: clip;
    }
    .sq-eab-cta {
        margin-right: 0;
        text-align: center;
        width: 100%;
        padding: 6px;
        font-size: 11px;
    }
}

/* ===== RESULTS GRID AND DETAILS ===== */
.res-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.res-grid-cell {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.res-grid-cell.ok {
    background-color: #2ec4b6; /* soft green/teal */
    box-shadow: 0 2px 8px rgba(46, 196, 182, 0.25);
}

.res-grid-cell.no {
    background-color: #e71d36; /* soft red */
    box-shadow: 0 2px 8px rgba(231, 29, 54, 0.25);
}

.res-grid-cell.skipped {
    background-color: #95a5a6; /* gray */
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.25);
}

.res-grid-cell:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.res-grid-cell.active {
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.25);
    transform: scale(1.05);
}

.res-detail-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.res-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.res-detail-q-title {
    font-size: 15px;
    font-weight: 800;
    color: #2c3e50;
}

.res-detail-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.res-detail-badge.ok {
    background: #d4f5dd;
    color: #27ae60;
}

.res-detail-badge.no {
    background: #fdf3f3;
    color: #e74c3c;
}

.res-detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.res-detail-media-wrap {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    background: #000;
}

.res-detail-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.res-detail-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.res-detail-row {
    font-size: 13px;
    line-height: 1.5;
}

.res-detail-explanation {
    background: #fffbef;
    border-right: 4px solid #f39c12;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
    direction: rtl;
    margin-top: 6px;
}

/* ===== EBOOK RESULT BANNER ===== */
.ebook-result-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #101726 0%, #1c3d75 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 18px;
    padding: 24px 32px;
    margin-top: 16px;
    direction: rtl;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 0 15px rgba(58, 123, 213, 0.2);
    position: relative;
    overflow: hidden;
    gap: 24px;
}

.ebook-result-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.erb-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
    text-align: right;
}

.erb-badge {
    align-self: flex-start;
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid rgba(255, 215, 0, 0.3);
    letter-spacing: 0.5px;
}

.erb-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
    line-height: 1.4;
    margin: 0;
}

.erb-text {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
}

.erb-price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.erb-price {
    font-size: 18px;
    font-weight: 900;
    color: #2ecc71;
}

.erb-old-price {
    font-size: 13px;
    color: #a0aec0;
    text-decoration: line-through;
}

.erb-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #0b0f19 !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    margin-top: 8px;
    text-align: center;
    border: none;
    cursor: pointer;
}

.erb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
    filter: brightness(1.05);
}

.erb-book-cover {
    flex-shrink: 0;
    width: 100px;
    height: 140px;
    perspective: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.erb-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: -6px 6px 15px rgba(0, 0, 0, 0.4);
    transform: rotateY(-18deg) rotateX(5deg);
    transition: transform 0.4s ease;
}

.ebook-result-banner:hover .erb-book-cover img {
    transform: rotateY(-25deg) rotateX(8deg) scale(1.06);
}

@media (max-width: 600px) {
    .ebook-result-banner {
        flex-direction: column;
        padding: 20px;
        text-align: center;
        align-items: center;
        gap: 20px;
    }
    .erb-badge {
        align-self: center;
    }
    .erb-btn {
        align-self: stretch;
    }
    .erb-price-section {
        justify-content: center;
    }
    .erb-book-cover {
        width: 90px;
        height: 125px;
    }
}

/* Rendering Optimizations */
.yt-section, .pdf-section, .faq-section {
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

/* ===== EBOOK ADVERTISEMENT BANNER (GLOBAL) ===== */
.home-ebook-banner {
    background: linear-gradient(135deg, #0f3060 0%, #1a56a8 100%);
    border-radius: 16px;
    margin: 40px auto;
    max-width: 1100px;
    padding: 40px;
    color: white;
    box-shadow: 0 10px 30px rgba(15, 48, 96, 0.25);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}
.home-ebook-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}
.heb-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}
.heb-content {
    flex: 1;
}
.heb-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
}
.heb-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
    color: white;
}
.heb-desc {
    font-size: 14px;
    opacity: 0.88;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #f1f5f9;
}
.heb-price-tag {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: white;
}
.heb-price {
    font-size: 22px;
    color: #25D366;
    font-weight: 800;
}
.heb-old-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: 15px;
}
.heb-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white !important;
    text-decoration: none !important;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(37,211,102,0.35);
    transition: all 0.25s ease;
}
.heb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.5);
    background: #20ba56;
}
.heb-image {
    flex-shrink: 0;
    width: 150px;
    display: flex;
    justify-content: center;
}
.heb-book-cover {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: -8px 8px 20px rgba(0,0,0,0.35);
    transition: transform 0.3s;
}
.home-ebook-banner:hover .heb-book-cover {
    transform: rotate(-3deg) scale(1.05);
}
@media (max-width: 768px) {
    .heb-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }
    .home-ebook-banner {
        padding: 28px 18px;
        margin: 24px 16px;
    }
    .heb-price-tag, .heb-actions {
        justify-content: center;
    }
    .heb-image {
        width: 120px;
    }
}


/* ===== 5-SECOND DOWNLOAD TIMER MODAL STYLES ===== */
.dl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.dl-modal-overlay.dl-modal-open {
    opacity: 1;
    visibility: visible;
}
.dl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}
.dl-modal-box {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: rtl;
}
.dl-modal-overlay.dl-modal-open .dl-modal-box {
    transform: scale(1);
}
.dl-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.dl-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.dl-timer-ring {
    position: relative;
    width: 84px;
    height: 84px;
    margin: 0 auto 20px;
}
.dl-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.dl-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}
.dl-ring-progress {
    fill: none;
    stroke: #3498db;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.9s linear;
}
.dl-timer-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: #1a56a8;
}
.dl-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}
.dl-modal-sub {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}
.dl-modal-loader-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.dl-loader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3498db, #25D366);
    border-radius: 10px;
    transition: width 0.9s linear;
}
.dl-done-icon {
    width: 64px;
    height: 64px;
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.dl-done-icon svg {
    width: 36px;
    height: 36px;
}
.dl-manual-btn {
    display: inline-block;
    width: 100%;
    background: #25D366;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    margin-top: 14px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.dl-manual-btn:hover {
    background: #20ba56;
    transform: translateY(-2px);
}


/* ===== EBOOK MINI BANNER INSIDE DOWNLOAD MODAL ===== */
.dl-modal-ebook-card {
    background: linear-gradient(135deg, #0f3060 0%, #1a56a8 100%);
    border-radius: 16px;
    padding: 14px 16px;
    margin-top: 20px;
    text-align: right;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 48, 96, 0.25);
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}
.dl-ebook-badge-wrap {
    margin-bottom: 8px;
}
.dl-ebook-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.35);
    color: #ffd700;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 12px;
}
.dl-ebook-body {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dl-ebook-thumb {
    width: 48px;
    height: auto;
    border-radius: 6px;
    box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.dl-ebook-details {
    flex: 1;
    min-width: 0;
}
.dl-ebook-heading {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dl-ebook-sub {
    font-size: 11px;
    color: #cbd5e1;
    margin-bottom: 8px;
    line-height: 1.3;
}
.dl-ebook-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
}
.dl-ebook-prices {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dl-ebook-price {
    font-size: 14px;
    font-weight: 900;
    color: #25D366;
}
.dl-ebook-old-price {
    font-size: 11px;
    text-decoration: line-through;
    color: #94a3b8;
}
.dl-ebook-cta-btn {
    display: inline-flex;
    align-items: center;
    background: #25D366;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.dl-ebook-cta-btn:hover {
    background: #20ba56;
    transform: translateY(-1px);
}


/* ===== GLOBAL MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    .dl-page-header h1 {
        font-size: 24px !important;
        line-height: 1.35 !important;
    }
    .dl-page-header p {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }
    .dl-features {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    .dl-details-wrapper {
        flex-direction: column !important;
        gap: 24px !important;
        padding: 0 16px !important;
    }
    .dl-box {
        padding: 20px 16px !important;
        border-radius: 16px !important;
    }
    .dl-modal-box {
        padding: 24px 18px !important;
        max-width: 90% !important;
    }
}


/* ===== LEGAL DISCLAIMER MODAL STYLES ===== */
.legal-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.legal-modal-overlay.legal-modal-open {
    opacity: 1;
    visibility: visible;
}
.legal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
}
.legal-modal-box {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}
.legal-modal-overlay.legal-modal-open .legal-modal-box {
    transform: scale(1);
}
.legal-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.legal-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.legal-modal-header {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.legal-header-icon {
    font-size: 32px;
    margin-bottom: 6px;
}
.legal-modal-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.legal-modal-sub {
    font-size: 13px;
    color: #64748b;
}
.legal-modal-body {
    overflow-y: auto;
    padding-left: 8px;
    flex: 1;
}
.legal-modal-body::-webkit-scrollbar {
    width: 5px;
}
.legal-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.legal-section {
    margin-bottom: 16px;
    background: #f8fafc;
    padding: 14px;
    border-radius: 12px;
    border-right: 3px solid #1a56a8;
}
.legal-section h4 {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 6px;
}
.legal-section p {
    font-size: 13px;
    color: #475569;
    line-height: 1.65;
    margin: 0;
}
.legal-modal-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}
.legal-accept-btn {
    width: 100%;
    background: #1a56a8;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all 0.2s ease;
}
.legal-accept-btn:hover {
    background: #0f3060;
    transform: translateY(-1px);
}


/* ===== TRAFFIC SIGNS EXAM MODULE (.se-*) ===== */
.se-wrapper, .se-exam-wrapper, .se-results-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    direction: rtl;
    font-family: 'Cairo', system-ui, sans-serif;
}
.se-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.se-back-btn {
    background: #edf2ff;
    color: #3a7bd5;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.se-back-btn:hover {
    background: #d0e1fd;
}
.se-title {
    font-size: 22px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0;
}
.se-intro-box {
    background: #ffffff;
    border: 1px solid #d5dce6;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: 0 2px 10px rgba(44,62,80,0.05);
}
.se-intro-desc {
    margin: 0;
    font-size: 14.5px;
    color: #5a6a7d;
    line-height: 1.7;
}
.se-section-label {
    font-size: 16.5px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 14px;
}
.se-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.se-category-card {
    background: #ffffff;
    border: 2px solid #d5dce6;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}
.se-category-card:hover {
    border-color: #3a7bd5;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(58,123,213,0.12);
}
.se-category-card.active {
    border-color: #3a7bd5;
    background: #edf2ff;
    box-shadow: 0 4px 16px rgba(58,123,213,0.15);
}
.se-cat-icon {
    font-size: 26px;
    flex-shrink: 0;
}
.se-cat-info {
    flex: 1;
}
.se-cat-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #2c3e50;
}
.se-cat-count {
    font-size: 12.5px;
    color: #5a6a7d;
    margin-top: 2px;
}
.se-cat-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #3a7bd5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a7bd5;
    font-weight: 800;
    font-size: 13px;
}
.se-count-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.se-count-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    background: #ffffff;
    border: 2px solid #d5dce6;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.se-count-btn.active {
    background: #3a7bd5;
    color: white;
    border-color: #3a7bd5;
    box-shadow: 0 4px 14px rgba(58,123,213,0.3);
}
.se-start-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16.5px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(58,123,213,0.35);
    transition: all 0.25s;
}
.se-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(58,123,213,0.45);
}

/* Exam Screen */
.se-exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.se-exit-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.se-q-count {
    font-size: 15px;
    font-weight: 800;
    color: #2c3e50;
}
.se-score-badge {
    background: #f0f4f8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #5a6a7d;
}
.se-progress-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 24px;
}
.se-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a7bd5, #00d2ff);
    transition: width 0.3s ease;
}
.se-exam-container {
    background: #ffffff;
    border: 1px solid #d5dce6;
    border-radius: 18px;
    padding: 32px 24px;
    box-shadow: 0 6px 24px rgba(44,62,80,0.08);
}
.se-sign-card {
    text-align: center;
    margin-bottom: 28px;
}
.se-sign-img-box {
    width: 190px;
    height: 190px;
    margin: 0 auto 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.se-sign-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.se-sign-prompt {
    font-size: 20px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0;
}

/* 4 Options Grid */
.se-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.se-option-btn {
    background: #ffffff;
    border: 2px solid #d5dce6;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.se-option-btn:hover:not(.disabled) {
    border-color: #3a7bd5;
    background: #f4f8ff;
    transform: translateY(-2px);
}
.se-option-prefix {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #edf2ff;
    color: #3a7bd5;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.se-option-text {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
}

/* Option States */
.se-option-btn.correct {
    border-color: #27ae60 !important;
    background: #e8f8f0 !important;
}
.se-option-btn.correct .se-option-prefix {
    background: #27ae60 !important;
    color: white !important;
}
.se-option-btn.incorrect {
    border-color: #e74c3c !important;
    background: #fdecea !important;
}
.se-option-btn.incorrect .se-option-prefix {
    background: #e74c3c !important;
    color: white !important;
}
.se-option-btn.disabled {
    cursor: default;
    opacity: 0.85;
}

/* Explanation Feedback Card */
.se-feedback-card {
    background: #f8fafc;
    border: 1px solid #d5dce6;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    animation: fadeUp 0.3s ease forwards;
}
.se-feedback-status {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}
.se-feedback-status.is-correct {
    color: #27ae60;
}
.se-feedback-status.is-incorrect {
    color: #e74c3c;
}
.se-feedback-rule {
    font-size: 14.5px;
    color: #2c3e50;
    line-height: 1.7;
}

.se-action-bar {
    display: flex;
    justify-content: flex-end;
}
.se-next-btn {
    padding: 14px 32px;
    background: #3a7bd5;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(58,123,213,0.3);
    transition: all 0.25s;
}
.se-next-btn:hover {
    background: #2a69c4;
    transform: translateY(-2px);
}

/* Results Screen */
.se-results-card {
    background: #ffffff;
    border: 1px solid #d5dce6;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(44,62,80,0.08);
    margin-bottom: 36px;
}
.se-score-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.se-score-circle.gold {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}
.se-score-circle.silver {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    color: white;
}
.se-score-circle.bronze {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
}
.se-score-num {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}
.se-score-pct {
    font-size: 14px;
    font-weight: 700;
    opacity: 0.9;
    margin-top: 4px;
}
.se-badge-title {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 10px;
}
.se-badge-desc {
    font-size: 15px;
    color: #5a6a7d;
    margin: 0 0 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.se-results-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.se-res-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.25s;
}
.se-res-btn.primary {
    background: #3a7bd5;
    color: white;
    box-shadow: 0 4px 14px rgba(58,123,213,0.3);
}
.se-res-btn.primary:hover {
    background: #2a69c4;
    transform: translateY(-2px);
}
.se-res-btn.secondary {
    background: #edf2ff;
    color: #3a7bd5;
}
.se-res-btn.secondary:hover {
    background: #d0e1fd;
}
.se-res-btn.outline {
    background: transparent;
    color: #5a6a7d;
    border: 1px solid #d5dce6;
}
.se-res-btn.outline:hover {
    background: #f0f4f8;
}

/* Review List */
.se-review-heading {
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 18px;
}
.se-review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.se-review-item {
    background: #ffffff;
    border: 1px solid #d5dce6;
    border-radius: 14px;
    padding: 18px;
}
.se-review-item.pass {
    border-right: 5px solid #27ae60;
}
.se-review-item.fail {
    border-right: 5px solid #e74c3c;
}
.se-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.se-review-num {
    font-weight: 800;
    color: #5a6a7d;
    font-size: 14px;
}
.se-review-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
}
.se-review-badge.pass {
    background: #e8f8f0;
    color: #27ae60;
}
.se-review-badge.fail {
    background: #fdecea;
    color: #e74c3c;
}
.se-review-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.se-review-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.se-review-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.se-review-content {
    flex: 1;
}
.se-review-title {
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 4px;
}
.se-review-chosen {
    font-size: 13.5px;
    margin-bottom: 6px;
}
.se-review-rule {
    font-size: 13.5px;
    color: #5a6a7d;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .se-categories-grid, .se-options-grid {
        grid-template-columns: 1fr;
    }
    .se-wrapper, .se-exam-wrapper, .se-results-wrapper {
        padding: 20px 14px 40px;
    }
    .se-exam-container {
        padding: 20px 14px;
    }
    .se-sign-img-box {
        width: 150px;
        height: 150px;
    }
    .se-sign-prompt {
        font-size: 17px;
    }
    .se-results-actions {
        flex-direction: column;
    }
    .se-res-btn {
        width: 100%;
    }
}


/* ===== NEW CARD BADGE (.card-new-badge) ===== */
.card-new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    font-family: 'Cairo', system-ui, sans-serif;
    padding: 4px 11px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
    animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 6px 18px rgba(239, 68, 68, 0.65);
    }
}

/* ==========================================================================
   MOCK EXAM 2026 - NEW QUESTION WINDOW DESIGN (exam.html)
   ========================================================================== */

/* Exam Page Container & Background */
.exam-page-wrap {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  direction: rtl;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: #124282;
  color: #ffffff;
}

/* Background Traffic Signs Wallpaper Pattern */
.traffic-bg-pattern {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  background: radial-gradient(circle at 50% 30%, #2e85dc 0%, #1e60a9 55%, #124282 100%);
  overflow: hidden;
  pointer-events: none;
}

.bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

/* Master Stage Wrapper */
.exam-stage-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 6px) 10px env(safe-area-inset-bottom, 6px) 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.exam-app-container {
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(4px, 0.9vh, 8px);
  margin: 0 auto;
  position: relative;
  z-index: 10;
  overflow: hidden;
  box-sizing: border-box;
}

/* 1. Exam Top Navigation Bar */
.exam-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 6px;
  flex-shrink: 0;
  background: rgba(14, 55, 115, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(0, 15, 40, 0.25);
  box-sizing: border-box;
}

.exam-top-actions-right,
.exam-top-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-icon-btn {
  width: clamp(36px, 4.8vh, 42px);
  height: clamp(36px, 4.8vh, 42px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  outline: none;
  padding: 0;
}

.exam-icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.45);
}

.exam-icon-btn:active {
  transform: scale(0.94);
}

.exam-icon-btn.active {
  background: rgba(0, 230, 118, 0.25);
  border-color: #00e676;
  color: #00e676;
}

.exam-icon-btn.muted {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.6);
  color: #ff6b6b;
}

.exam-brand-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
}

.exam-logo-badge {
  width: clamp(36px, 4.8vh, 42px);
  height: clamp(36px, 4.8vh, 42px);
  border-radius: 12px;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  transition: transform 0.25s ease;
  box-sizing: border-box;
}

.exam-brand-center:hover .exam-logo-badge {
  transform: rotate(6deg) scale(1.06);
}

.exam-header-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}

.exam-brand-year {
  font-size: 11px;
  font-weight: 800;
  color: #00e676;
  background: rgba(0, 230, 118, 0.2);
  border: 1px solid rgba(0, 230, 118, 0.45);
  padding: 1.5px 6px;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.2px;
}

/* 2. Status Badges Row */
.exam-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 2px;
  margin: 0;
  box-sizing: border-box;
}

.status-pill {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 5px clamp(12px, 3vw, 18px);
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(13px, 3.4vw, 15px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  letter-spacing: -0.2px;
}

.timer-pill {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.timer-pill:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.35);
}

.pause-icon {
  font-size: 11px;
  opacity: 0.9;
  margin-right: 2px;
}

.timer-pill.warning {
  color: #ffa726;
  border-color: rgba(255, 167, 38, 0.6);
  box-shadow: 0 0 14px rgba(255, 167, 38, 0.4);
}

.timer-pill.danger {
  color: #ff5252;
  border-color: rgba(255, 82, 82, 0.7);
  box-shadow: 0 0 18px rgba(255, 82, 82, 0.6);
  animation: timerPulse 0.8s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.timer-pill.paused {
  color: #ffb300;
  border-color: rgba(255, 179, 0, 0.6);
  background: rgba(40, 25, 0, 0.75);
}

/* 3. Media Scenario Card */
.exam-media-section {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  padding: 0 2px;
  margin: 0;
  box-sizing: border-box;
}

.exam-media-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  border-radius: clamp(16px, 2.4vh, 22px);
  background: radial-gradient(circle at 50% 40%, rgba(18, 66, 130, 0.55) 0%, rgba(5, 20, 45, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(6px, 1.2vh, 12px);
  box-shadow: 0 12px 32px rgba(0, 15, 45, 0.45), inset 0 0 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.exam-scene-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: clamp(12px, 1.8vh, 16px);
  display: block;
  z-index: 1;
}

.exam-media-card.exam-media-placeholder {
  border: 2px dashed rgba(255, 255, 255, 0.35);
  padding: clamp(14px, 2.5vh, 24px) 16px;
}

.media-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vh, 8px);
  z-index: 2;
  position: relative;
}

.placeholder-icon-box {
  width: clamp(44px, 7vh, 68px);
  height: clamp(44px, 7vh, 68px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 2px;
}

.placeholder-title {
  font-size: clamp(14px, 3.2vw, 20px);
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.2px;
}

.placeholder-specs-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.4);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: clamp(10px, 2vw, 12px);
  font-weight: 700;
  color: #00e676;
  margin-top: 4px;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.scene-watermark-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  direction: ltr;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 3;
  pointer-events: none;
}

.scene-official-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px 3px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(230, 81, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  pointer-events: none;
}

.scene-mini-logo-watermark {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2.5px 8px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 3;
  pointer-events: none;
}

.scene-mini-logo-watermark img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border-radius: 3px;
}

/* 4. Moroccan Driving Exam Keypad Section */
.exam-keypad-section {
  display: flex;
  gap: clamp(6px, 1.4vw, 10px);
  width: 100%;
  flex: 0 0 auto;
  height: clamp(120px, 18vh, 155px);
  margin: 0;
  box-sizing: border-box;
}

.keypad-action-btn {
  width: clamp(52px, 14vw, 70px);
  border-radius: clamp(14px, 2vh, 18px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  outline: none;
  padding: 0;
}

.btn-cancel {
  background: linear-gradient(180deg, #f44336 0%, #c62828 100%);
  color: #ffffff;
}

.btn-cancel:hover {
  background: linear-gradient(180deg, #ff5252 0%, #d32f2f 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(211, 47, 47, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-cancel:active {
  transform: scale(0.95);
}

.btn-validate {
  background: linear-gradient(180deg, #43a047 0%, #1b5e20 100%);
  color: #ffffff;
}

.btn-validate:hover {
  background: linear-gradient(180deg, #4caf50 0%, #2e7d32 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(46, 125, 50, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-validate:active {
  transform: scale(0.95);
}

.keypad-numbers-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: clamp(5px, 1.2vw, 8px);
}

.keypad-num-btn {
  background: linear-gradient(180deg, #1565c0 0%, #0d47a1 100%);
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: clamp(12px, 1.8vh, 16px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 6px 18px rgba(13, 71, 161, 0.45);
  outline: none;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.key-digit {
  font-size: clamp(24px, 4.8vh, 36px);
  font-weight: 900;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.keypad-num-btn:hover {
  background: linear-gradient(180deg, #1976d2 0%, #1565c0 100%);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.keypad-num-btn:active {
  transform: scale(0.95);
}

.keypad-num-btn.selected {
  background: linear-gradient(180deg, #0288d1 0%, #01579b 100%);
  border-color: #00e676;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.75), inset 0 0 14px rgba(0, 230, 118, 0.35);
  color: #00e676;
  transform: scale(0.98);
}

.keypad-num-btn:disabled,
.keypad-num-btn.disabled {
  opacity: 0.22;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.8);
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.1);
}

.desktop-keyboard-bar {
  display: none;
}

/* Tablet Optimization (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .exam-app-container {
    max-width: 680px;
    height: min(94vh, 840px);
    background: rgba(18, 66, 130, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 36px;
    padding: 16px 22px 14px;
    box-shadow: 0 25px 60px rgba(10, 35, 70, 0.45);
    gap: 10px;
  }

  .exam-media-card {
    border-radius: 24px;
    padding: 12px;
  }

  .placeholder-icon-box {
    width: 64px;
    height: 64px;
  }

  .placeholder-title {
    font-size: 19px;
  }

  .exam-status-row {
    gap: 12px;
  }

  .status-pill {
    padding: 5px 18px;
    font-size: 15px;
  }

  .exam-keypad-section {
    height: 150px;
    gap: 10px;
  }

  .keypad-action-btn {
    width: 76px;
    border-radius: 18px;
  }

  .keypad-numbers-grid {
    gap: 8px;
  }

  .keypad-num-btn {
    border-radius: 16px;
  }

  .key-digit {
    font-size: 34px;
  }
}

/* Desktop Optimization (>= 1025px) - Expansive Studio Workstation */
@media (min-width: 1025px) {
  .exam-stage-wrapper {
    padding: 16px 24px;
    align-items: center;
  }

  .exam-app-container {
    max-width: 1280px;
    width: 96vw;
    height: min(94vh, 880px);
    background: rgba(12, 48, 100, 0.62);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 36px;
    padding: 18px 26px 16px;
    box-shadow: 0 35px 90px rgba(6, 20, 50, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: 1fr 330px;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
      "topbar   topbar"
      "status   status"
      "media    keypad"
      "media    shortcuts";
    gap: 14px 20px;
    align-items: stretch;
  }

  /* 1. Top Bar spanning full width */
  .exam-top-bar {
    grid-area: topbar;
    padding: 7px 18px;
    border-radius: 20px;
    background: rgba(14, 55, 115, 0.75);
  }

  .exam-icon-btn {
    width: 42px;
    height: 42px;
  }

  .exam-logo-badge {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .exam-brand-year {
    font-size: 12px;
    padding: 2.5px 8px;
  }

  /* 2. Status Badges Row spanning full width */
  .exam-status-row {
    grid-area: status;
    gap: 14px;
    padding: 0 4px;
  }

  .status-pill {
    padding: 7px 22px;
    font-size: 15.5px;
    border-radius: 50px;
  }

  /* 3. Massive Scenario Media Card */
  .exam-media-section {
    grid-area: media;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    padding: 0;
    margin: 0;
  }

  .exam-media-card {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 28px;
    padding: 10px;
    background: radial-gradient(circle at 50% 40%, rgba(18, 66, 130, 0.55) 0%, rgba(3, 12, 30, 0.95) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 20px 50px rgba(0, 10, 30, 0.55), inset 0 0 60px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .exam-scene-img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
  }

  .placeholder-icon-box {
    width: 76px;
    height: 76px;
    border-radius: 24px;
  }

  .placeholder-icon-box svg {
    width: 48px;
    height: 48px;
  }

  .placeholder-title {
    font-size: 24px;
  }

  .placeholder-specs-tag {
    font-size: 13px;
    padding: 4px 16px;
    border-radius: 20px;
  }

  /* 4. Ergonomic Keypad Column */
  .exam-keypad-section {
    grid-area: keypad;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(7, 28, 62, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(0, 10, 25, 0.35);
    box-sizing: border-box;
  }

  .keypad-action-btn.btn-cancel {
    width: 100%;
    height: 50px;
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(198, 40, 40, 0.4);
  }

  .keypad-numbers-grid {
    width: 100%;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
  }

  .keypad-num-btn {
    border-radius: 18px;
    border-width: 2.5px;
  }

  .key-digit {
    font-size: clamp(34px, 4.8vh, 46px);
  }

  .keypad-action-btn.btn-validate {
    width: 100%;
    height: 58px;
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(27, 94, 32, 0.45);
  }

  /* 5. Desktop Keyboard Shortcuts Hint */
  .desktop-keyboard-bar {
    grid-area: shortcuts;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    padding: 8px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.92);
    direction: rtl;
    box-sizing: border-box;
  }

  .kbd-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
  }

  .kbd-chip kbd {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    padding: 1.5px 7px;
    font-family: monospace;
    font-size: 11px;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  }
}

/* Extra Large Displays (>= 1440px) */
@media (min-width: 1440px) {
  .exam-app-container {
    max-width: 1440px;
    height: min(94vh, 920px);
    grid-template-columns: 1fr 380px;
    gap: 16px 24px;
    padding: 22px 32px 18px;
    border-radius: 40px;
  }

  .exam-media-card {
    border-radius: 32px;
    padding: 14px;
  }

  .exam-scene-img {
    border-radius: 24px;
  }

  .placeholder-title {
    font-size: 26px;
  }

  .exam-keypad-section {
    padding: 20px;
    border-radius: 30px;
    gap: 14px;
  }

  .keypad-action-btn.btn-cancel {
    height: 56px;
  }

  .keypad-action-btn.btn-validate {
    height: 64px;
  }

  .key-digit {
    font-size: 48px;
  }
}

/* ====================================================
   PREMIUM GOOGLE ADSENSE CARD STYLES
   ==================================================== */
.site-ad-card {
  max-width: 860px;
  margin: 32px auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 10px 16px 16px;
  text-align: center;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease;
}

.site-ad-card ins.adsbygoogle {
  max-width: 100% !important;
  margin: 0 auto;
}

.ad-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.ad-badge {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  background: #edf2f7;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.ad-slot-body {
  min-height: 90px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media print {
  .site-ad-card, .ad-container {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .site-ad-card {
    margin: 20px 12px;
    padding: 8px 10px 12px;
    border-radius: 12px;
  }
}



