/* =====================================================================
   site.css — עיצוב דף הבית ודפי המקצועות
   אותה שפה עיצובית של אתר התרגולים של "המרכז להישגים לימודיים":
   רקע בהיר עם כתמי צבע צפים, פס צבעוני בראש הדף, כותרת "גלולה" מזכוכית,
   כרטיסי מקצוע צבעוניים ומבריקים עם מדליון זכוכית, כפתורי "בועה" לבנים.
   ===================================================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e3a8a;
    --indigo: #4338ca;
    --text: #1e293b;
    --text-2: #334155;
    --muted: #64748b;
    --line: rgba(203, 213, 225, .75);
    --bg: #e8f0fe;
    --card: rgba(255, 255, 255, .88);
    --ok: #16a34a;
    --radius: 24px;
    --gradient-royal: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    --shadow: 0 15px 35px rgba(15, 23, 42, .06);
    --shadow-hover: 0 20px 44px -12px rgba(30, 58, 138, .22);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { touch-action: manipulation; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Heebo', 'Rubik', sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.5;
    display: flex; flex-direction: column;
    overflow-x: hidden; position: relative;
}
a { color: inherit; }
button { font-family: inherit; }

/* פס צבעוני דק בראש הדף */
body::before {
    content: ''; position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 5001; pointer-events: none;
    background: linear-gradient(90deg, #1e3a8a, #2563eb 22%, #7c3aed 45%, #059669 68%, #0891b2 88%, #2563eb);
}

/* ---------------- רקע חי: כתמי צבע צפים ---------------- */
.ambient-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-bg::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(900px 420px at 85% -5%, rgba(37, 99, 235, .07), transparent 60%),
        radial-gradient(700px 380px at 8% 30%, rgba(124, 58, 237, .05), transparent 60%),
        radial-gradient(800px 400px at 50% 115%, rgba(5, 150, 105, .05), transparent 60%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(15px); opacity: .55; animation: floatBlob 20s ease-in-out infinite alternate; }
.blob-1 { width: 600px; height: 600px; background: #c7e0ff; top: -150px; right: -150px; }
.blob-2 { width: 500px; height: 500px; background: #e9d5ff; bottom: -100px; left: -100px; animation-delay: -5s; }
.blob-3 { width: 300px; height: 300px; background: #fffbeb; top: 40%; left: 30%; animation-duration: 25s; }
.blob-4 { width: 380px; height: 380px; background: #ccfbf1; top: 15%; right: 18%; animation-duration: 28s; animation-delay: -9s; }
.blob-5 { width: 340px; height: 340px; background: #ffe4e6; bottom: 12%; right: 55%; animation-duration: 23s; animation-delay: -14s; }
@keyframes floatBlob { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 40px) scale(1.1); } }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------------- header: "גלולה" מזכוכית ---------------- */
.site-header {
    position: sticky; top: 15px; z-index: 1000;
    width: 95%; max-width: 1400px; margin: 15px auto 0;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px);
    border: 1px solid rgba(37, 99, 235, .12); border-radius: 50px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05), 0 1px 0 rgba(255, 255, 255, .9) inset;
}
.site-header-inner {
    padding: 10px 30px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; min-width: 0; }
.brand-mark {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    background: var(--gradient-royal); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(30, 58, 138, .3);
}
.brand-text { min-width: 0; }
.brand-name { display: block; font-weight: 900; font-size: 1.8rem; color: var(--text); line-height: 1.1; letter-spacing: -.5px; white-space: nowrap; }
.brand-name span {
    font-weight: 400;
    background: var(--gradient-royal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-sub { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* כפתור "בועה" לבן, כמו באתר הראשי */
.header-btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
    background: #fff; color: var(--text); border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 30px; padding: 10px 20px; font-weight: 700; font-size: .95rem; white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .03); transition: all .3s ease;
}
.header-btn i { color: var(--primary); font-size: 1.05rem; }
.header-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(37, 99, 235, .15); }
/* כניסת מנויים = CTA ראשי בגרדיאנט */
.header-btn.auth-in, .header-btn.primary {
    background: var(--gradient-royal); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(30, 58, 138, .3);
}
.header-btn.auth-in i, .header-btn.primary i { color: #fff; }
.header-btn.auth-in:hover, .header-btn.primary:hover { color: #fff; box-shadow: 0 12px 28px rgba(30, 58, 138, .4); }
.header-btn.ghost { background: #fff; color: var(--text); border: 1px solid rgba(226, 232, 240, .9); box-shadow: 0 4px 10px rgba(0, 0, 0, .03); }
@media (max-width: 900px) {
    .site-header { top: 10px; margin-top: 10px; }
    .site-header-inner { padding: 8px 14px; }
    .brand-name { font-size: 1.3rem; }
    .brand-mark { width: 40px; height: 40px; font-size: 1.1rem; }
}
@media (max-width: 640px) {
    .brand-sub { display: none; }
    .brand-name { font-size: 1.1rem; }
    .header-btn span { display: none; }
    .header-btn { padding: 10px 12px; border-radius: 50%; }
    .header-actions { gap: 8px; }
}

/* ---------------- layout ---------------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; flex: 1; }
.page-title {
    text-align: center; margin: 22px 0 8px; font-size: 3.1rem; font-weight: 900; letter-spacing: -1px; color: #2563eb;
    text-shadow: 0 4px 20px rgba(37, 99, 235, .2); animation: heroFadeUp .7s cubic-bezier(.22, 1, .36, 1) backwards;
}
.page-sub {
    text-align: center; margin: 0 auto 34px; color: #475569; font-size: 1.25rem; font-weight: 600; max-width: 660px;
    animation: heroFadeUp .7s .1s cubic-bezier(.22, 1, .36, 1) backwards;
}
.page-sub::after {
    content: ''; display: block; width: 96px; height: 4px; margin: 14px auto 0; border-radius: 4px; opacity: .9;
    background: linear-gradient(90deg, #e11d48, #f59e0b, #7c3aed, #059669, #0891b2);
}
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) { .page-title { font-size: 2rem; } .page-sub { font-size: 1.05rem; } .wrap { padding: 18px 14px 50px; } }

/* ---------------- index: regulator groups & subject tiles ---------------- */
.reg-group { margin-bottom: 40px; }
.reg-head {
    display: flex; align-items: center; gap: 14px; margin: 0 auto 22px; width: fit-content; max-width: 100%;
    background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .8); border-radius: 50px; padding: 10px 26px 10px 22px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.reg-icon {
    width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: var(--gradient-royal); color: #fff; font-size: 1.1rem; flex-shrink: 0; box-shadow: 0 6px 16px rgba(30, 58, 138, .28);
}
.reg-head h2 { margin: 0; font-size: 1.3rem; font-weight: 900; }
.reg-head p { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 600; }
.subject-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }

.subject-card {
    --c1: #2563eb; --c2: #60a5fa;
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    width: 250px; min-height: 280px; padding: 26px 16px 22px; gap: 8px;
    border-radius: 30px; border: 1px solid rgba(255, 255, 255, .35); overflow: hidden; cursor: pointer;
    text-decoration: none; color: #fff;
    background:
        linear-gradient(to top, rgba(15, 23, 42, .22), rgba(15, 23, 42, 0) 42%),
        radial-gradient(140% 100% at 85% -10%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 45%),
        linear-gradient(150deg, var(--c2) 0%, var(--c1) 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08), 0 30px 55px -16px color-mix(in srgb, var(--c1) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease, filter .35s ease;
    animation: sbCardIn .65s cubic-bezier(.22, 1, .36, 1) backwards;
}
.subject-card:nth-child(2) { animation-delay: .08s; }
.subject-card:nth-child(3) { animation-delay: .16s; }
.subject-card:nth-child(4) { animation-delay: .24s; }
.subject-card:nth-child(5) { animation-delay: .32s; }
@keyframes sbCardIn { from { opacity: 0; transform: translateY(28px) scale(.95); } to { opacity: 1; transform: none; } }
/* עיגולי זכוכית דקורטיביים בפינות */
.subject-card::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
    background:
        radial-gradient(circle 92px at 88% -6%, rgba(255, 255, 255, .2) 98%, transparent 100%),
        radial-gradient(circle 64px at -6% 106%, rgba(255, 255, 255, .16) 98%, transparent 100%),
        radial-gradient(circle 38px at 106% 78%, rgba(255, 255, 255, .12) 98%, transparent 100%);
}
/* הבזק אור אלכסוני בריחוף */
.subject-card::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; pointer-events: none; z-index: 1;
    background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .35) 50%, transparent 80%);
    transform: translateX(-160%) skewX(-14deg); transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.subject-card:hover::after { transform: translateX(300%) skewX(-14deg); }
.subject-card:hover { transform: translateY(-10px) scale(1.02); filter: saturate(1.12) brightness(1.04); }
.subject-card:focus-visible { outline: 3px solid #1e3a8a; outline-offset: 3px; }

.subject-card .sc-top { display: flex; flex-direction: column; align-items: center; gap: 0; position: relative; z-index: 2; }
.subject-card .sc-icon {
    width: 82px; height: 82px; border-radius: 50%; margin-bottom: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 2.1rem; color: #fff;
    background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255, 255, 255, .5);
    box-shadow: 0 10px 24px -6px rgba(15, 23, 42, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
    text-shadow: 0 2px 8px rgba(15, 23, 42, .3);
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .3s ease;
}
.subject-card:hover .sc-icon { transform: scale(1.1) rotate(-6deg); background: rgba(255, 255, 255, .28); }
.subject-card h3 { margin: 0; font-size: 1.4rem; font-weight: 900; line-height: 1.25; color: #fff; text-shadow: 0 2px 10px rgba(15, 23, 42, .35); }
.subject-card .sc-sub { margin: 0; color: rgba(255, 255, 255, .93); font-size: .92rem; font-weight: 700; text-shadow: 0 1px 6px rgba(15, 23, 42, .3); position: relative; z-index: 2; }
.subject-card .sc-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; position: relative; z-index: 2; }
.subject-card .chip {
    background: rgba(255, 255, 255, .2); color: #fff; border: 1px solid rgba(255, 255, 255, .35);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); font-size: .76rem;
}
.subject-card .sc-go { position: absolute; left: 18px; top: 18px; z-index: 2; color: rgba(255, 255, 255, .8); font-size: .9rem; transition: transform .2s ease; }
.subject-card:hover .sc-go { transform: translateX(-4px); color: #fff; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f1f5f9; color: var(--text-2); border-radius: 999px;
    padding: 4px 10px; font-size: .78rem; font-weight: 700;
}
@media (max-width: 640px) {
    .subject-grid { gap: 14px; }
    .subject-card { width: calc(50% - 7px); min-height: 230px; padding: 20px 10px 16px; border-radius: 24px; }
    .subject-card .sc-icon { width: 62px; height: 62px; font-size: 1.6rem; margin-bottom: 10px; }
    .subject-card h3 { font-size: 1.1rem; }
    .subject-card .sc-sub { font-size: .8rem; }
    .subject-card .chip { font-size: .7rem; padding: 3px 8px; }
    .reg-head { padding: 8px 18px 8px 14px; }
    .reg-head h2 { font-size: 1.1rem; }
}
@media (max-width: 380px) { .subject-card { width: 100%; } }

.how-it-works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 10px 0 34px; }
.how-step {
    background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .85); border-radius: var(--radius); padding: 16px 18px;
    display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow);
}
.how-step .hs-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.how-step b { display: block; font-size: 1rem; margin-bottom: 2px; }
.how-step span { color: var(--muted); font-size: .88rem; line-height: 1.5; }
@media (max-width: 760px) { .how-it-works { grid-template-columns: 1fr; } }

/* ---------------- subject page ---------------- */
.subject-hero {
    --c1: #2563eb; --c2: #60a5fa;
    position: relative; overflow: hidden;
    background:
        linear-gradient(to top, rgba(15, 23, 42, .2), rgba(15, 23, 42, 0) 50%),
        radial-gradient(140% 120% at 90% -20%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 50%),
        linear-gradient(150deg, var(--c2) 0%, var(--c1) 100%);
    color: #fff; border-radius: 30px; padding: 30px 32px; margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08), 0 30px 55px -18px color-mix(in srgb, var(--c1) 55%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45);
    display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
    animation: heroFadeUp .6s cubic-bezier(.22, 1, .36, 1) backwards;
}
.subject-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background:
        radial-gradient(circle 110px at 92% -8%, rgba(255, 255, 255, .18) 98%, transparent 100%),
        radial-gradient(circle 70px at 4% 112%, rgba(255, 255, 255, .14) 98%, transparent 100%);
}
.subject-hero > * { position: relative; }
.subject-hero .sh-icon {
    width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255, 255, 255, .2); border: 1.5px solid rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 10px 24px -6px rgba(15, 23, 42, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
    display: flex; align-items: center; justify-content: center; font-size: 2.1rem;
}
.subject-hero .sh-text { flex: 1; min-width: 220px; }
.subject-hero .sh-reg { font-size: .82rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 12px; }
.subject-hero h1 { margin: 8px 0 4px; font-size: 2.2rem; font-weight: 900; line-height: 1.2; text-shadow: 0 2px 10px rgba(15, 23, 42, .3); }
.subject-hero p { margin: 0; opacity: .9; }
.subject-hero .sh-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.subject-hero .sh-stat { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); border-radius: 12px; padding: 6px 12px; font-size: .85rem; font-weight: 700; display: inline-flex; gap: 7px; align-items: center; }
@media (max-width: 600px) { .subject-hero { padding: 22px 18px; border-radius: 24px; } .subject-hero h1 { font-size: 1.5rem; } .subject-hero .sh-icon { width: 58px; height: 58px; font-size: 1.5rem; } }

.activity-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px;
}
.activity-tab {
    display: flex; align-items: center; gap: 12px; text-align: right;
    background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, .9); border-radius: 22px; padding: 14px 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
    cursor: pointer; transition: all .25s ease;
    color: var(--text);
}
.activity-tab:hover { border-color: #bfdbfe; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(37, 99, 235, .14); }
.activity-tab .at-ico { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.activity-tab b { display: block; font-size: 1.05rem; font-weight: 900; }
.activity-tab small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.activity-tab[data-act="practice"] .at-ico { background: #eff6ff; color: #2563eb; }
.activity-tab[data-act="learn"] .at-ico { background: #f0fdfa; color: #0d9488; }
.activity-tab[data-act="exam"] .at-ico { background: #fef2f2; color: #dc2626; }
.activity-tab.active { border-color: var(--primary); background: #f8faff; box-shadow: 0 8px 20px -12px rgba(37, 99, 235, .5); }
.activity-tab[data-act="learn"].active { border-color: #0d9488; background: #f7fdfc; box-shadow: 0 8px 20px -12px rgba(13, 148, 136, .5); }
.activity-tab[data-act="exam"].active { border-color: #dc2626; background: #fffafa; box-shadow: 0 8px 20px -12px rgba(220, 38, 38, .45); }
@media (max-width: 700px) {
    .activity-tabs { gap: 8px; }
    .activity-tab { flex-direction: column; text-align: center; padding: 12px 8px; gap: 6px; }
    .activity-tab small { display: none; }
    .activity-tab .at-ico { width: 38px; height: 38px; }
}

.mode-hint {
    display: flex; align-items: center; gap: 10px; margin: 0 2px 16px;
    color: var(--text-2); font-size: .95rem; font-weight: 600;
}
.mode-hint i { color: var(--primary); }
.topics-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 12px; flex-wrap: wrap; }
.topics-toolbar h2 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.search-box { position: relative; flex: 0 1 300px; }
.search-box input {
    width: 100%; border: 1.5px solid rgba(226, 232, 240, .95); border-radius: 30px; padding: 10px 40px 10px 16px;
    font-family: inherit; font-size: .95rem; background: #fff; outline: none;
}
.search-box input:focus { border-color: #93c5fd; }
.search-box i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; }

.topic-list { display: flex; flex-direction: column; gap: 12px; }
.topic-card {
    background: var(--card); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .9); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px 20px; transition: all .25s ease;
}
.topic-card:hover { border-color: #bfdbfe; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.topic-row { display: flex; align-items: center; gap: 14px; }
.topic-num {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    background: var(--gradient-royal); color: #fff; font-weight: 900; font-size: .95rem; box-shadow: 0 6px 14px rgba(30, 58, 138, .25);
    display: flex; align-items: center; justify-content: center;
}
.topic-main { flex: 1; min-width: 0; }
.topic-main h3 { margin: 0; font-size: 1.08rem; font-weight: 800; line-height: 1.35; }
.topic-main .tm-meta { color: var(--muted); font-size: .82rem; font-weight: 600; }
.topic-go {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    background: var(--gradient-royal); color: #fff; text-decoration: none; border-radius: 30px;
    padding: 10px 20px; font-weight: 800; font-size: .92rem; box-shadow: 0 8px 20px rgba(30, 58, 138, .28); transition: all .25s ease;
}
.topic-go:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(30, 58, 138, .38); }
.mode-learn .topic-go { background: linear-gradient(135deg, #0f766e, #0d9488); box-shadow: 0 8px 20px rgba(13, 148, 136, .3); }
.sub-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; padding-right: 50px; }
.sub-link {
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
    background: #fff; border: 1px solid rgba(226, 232, 240, .95); color: var(--text-2);
    border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sub-link i { font-size: .7rem; color: #94a3b8; }
.sub-link:hover { background: #eff6ff; border-color: #bfdbfe; color: var(--primary-dark); }
.mode-learn .sub-link:hover { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
@media (max-width: 600px) {
    .sub-row { padding-right: 0; }
    .topic-go span { display: none; }
    .topic-go { padding: 10px 12px; }
}

/* exam mode: topic selection */
.exam-check { display: none; width: 24px; height: 24px; accent-color: #dc2626; flex-shrink: 0; cursor: pointer; }
.mode-exam .exam-check { display: block; }
.mode-exam .topic-go, .mode-exam .sub-row { display: none; }
.mode-exam .topic-card { cursor: pointer; }
.mode-exam .topic-card.selected { border-color: #fca5a5; background: #fffafa; }
.exam-bar {
    display: none; position: sticky; bottom: 14px; z-index: 40; margin-top: 18px;
    background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(37, 99, 235, .12); border-radius: 30px; padding: 12px 18px;
    box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .35);
    align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.mode-exam .exam-bar { display: flex; }
.exam-bar .eb-info { font-weight: 700; color: var(--text-2); font-size: .95rem; }
.exam-bar .eb-info small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
.exam-bar .eb-actions { display: flex; gap: 8px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
    border-radius: 30px; padding: 11px 22px; font-weight: 800; font-size: .95rem; text-decoration: none; transition: all .25s ease;
}
.btn-red { background: #dc2626; color: #fff; }
.btn-red:hover { background: #b91c1c; }
.btn-red:disabled { background: #fca5a5; cursor: not-allowed; }
.btn-light { background: #f1f5f9; color: var(--text-2); }
.btn-light:hover { background: #e2e8f0; }
.empty-search { text-align: center; color: var(--muted); padding: 24px; display: none; }

.site-footer { text-align: center; color: var(--muted); font-size: .9rem; font-weight: 600; padding: 26px 16px 36px; }
.site-footer::before { content: ''; display: block; width: 72px; height: 3px; margin: 0 auto 16px; border-radius: 3px; background: linear-gradient(90deg, #1e3a8a, #2563eb, #7c3aed); opacity: .7; }
