/* ==========================================================================
   TypeMaster India — Design System
   ========================================================================== */

:root {
    /* Brand */
    --primary: #2f6bff;
    --primary-600: #1d4ed8;
    --primary-700: #1e40af;
    --accent: #ff9f1c;          /* saffron — India flavour */
    --accent-600: #f08a00;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 14px rgba(2, 8, 23, .12);
    --shadow-md: 0 16px 40px rgba(2, 8, 23, .25);
    --shadow-lg: 0 30px 70px rgba(2, 8, 23, .35);
    --container: 1180px;
    --font-sans: 'Poppins', system-ui, sans-serif;
    --font-display: 'Sora', 'Poppins', sans-serif;
    --font-hindi: 'Noto Sans Devanagari', 'Poppins', sans-serif;
}

/* ---------------- Dark theme (default) ---------------- */
[data-theme="dark"] {
    --bg: #070b16;
    --bg-2: #0a0f1e;
    --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(47, 107, 255, .18), transparent 60%),
               radial-gradient(900px 500px at 0% 10%, rgba(255, 159, 28, .10), transparent 55%),
               linear-gradient(180deg, #070b16, #0a0f1e 40%, #070b16);
    --surface: rgba(255, 255, 255, .045);
    --surface-2: rgba(255, 255, 255, .07);
    --surface-solid: #0f1729;
    --border: rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #eef2fb;
    --text-muted: #9aa8c7;
    --input-bg: #0d1426;
}

/* ---------------- Light theme ---------------- */
[data-theme="light"] {
    --bg: #eef2f9;
    --bg-2: #ffffff;
    --bg-grad: radial-gradient(1200px 600px at 80% -10%, rgba(47, 107, 255, .12), transparent 60%),
               radial-gradient(900px 500px at 0% 10%, rgba(255, 159, 28, .12), transparent 55%),
               linear-gradient(180deg, #eef2f9, #f6f8fc 40%, #eef2f9);
    --surface: rgba(255, 255, 255, .75);
    --surface-2: rgba(255, 255, 255, .92);
    --surface-solid: #ffffff;
    --border: rgba(15, 23, 42, .10);
    --border-strong: rgba(15, 23, 42, .16);
    --text: #0f172a;
    --text-muted: #56657f;
    --input-bg: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    min-height: 100vh;
    background: var(--bg);
    background-image: var(--bg-grad);
    background-attachment: fixed;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color .35s ease, color .35s ease;
}

main { min-height: 60vh; }

h1, h2, h3, h4, h5 { font-family: var(--font-display); letter-spacing: -.02em; }

a { text-decoration: none; }

.text-accent { color: var(--accent) !important; }
.text-primary-brand { color: var(--primary) !important; }
.text-muted-2 { color: var(--text-muted) !important; }
.font-hindi { font-family: var(--font-hindi); }

.container { max-width: var(--container); }

.section { padding: 96px 0; position: relative; }
.section-sm { padding: 64px 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    padding: 7px 14px;
    border-radius: 999px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin: 18px 0 14px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
}

/* ---------------- Buttons ---------------- */
.btn { font-weight: 600; border-radius: 12px; transition: .25s; }

.btn-brand {
    background: linear-gradient(135deg, var(--primary), var(--primary-700));
    color: #fff;
    border: none;
    box-shadow: 0 10px 26px rgba(47, 107, 255, .35);
}
.btn-brand:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(47, 107, 255, .45); }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-600));
    color: #1a1205;
    border: none;
    box-shadow: 0 10px 26px rgba(255, 159, 28, .32);
}
.btn-accent:hover { color: #1a1205; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(255, 159, 28, .42); }

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); transform: translateY(-2px); }

.btn-lg { padding: 14px 30px; font-size: 17px; }

/* ---------------- Glass surface ---------------- */
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.tm-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: color-mix(in srgb, var(--bg-2) 72%, transparent);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.tm-navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.04), transparent 40%, rgba(34, 211, 238, 0.04));
    pointer-events: none;
}
.tm-navbar .container { position: relative; z-index: 1; }
.tm-navbar .navbar-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.tm-navbar .brand-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-size: 18px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent);
    transition: transform .25s ease, box-shadow .25s ease;
}
.tm-navbar .brand-mark i { color: #fff; }
.tm-navbar .navbar-brand:hover .brand-mark {
    transform: translateY(-1px) rotate(-4deg) scale(1.04);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--primary) 45%, transparent);
}
.tm-navbar .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 10px;
    transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
}
.tm-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.tm-navbar .nav-link:hover {
    color: var(--text);
    background: var(--surface);
    transform: translateY(-1px);
}
.tm-navbar .nav-link.active {
    color: var(--text);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary) 16%, transparent),
        color-mix(in srgb, var(--accent) 12%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
    transform: translateY(-1px);
}
.tm-navbar .nav-link.active::after,
.tm-navbar .nav-link:hover::after { transform: scaleX(1); }

/* Keyboard accessibility — visible focus rings without hurting mouse users */
.tm-navbar .nav-link:focus-visible,
.tm-navbar .navbar-brand:focus-visible,
.tm-navbar .dropdown-item:focus-visible,
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 10px;
}
.tm-navbar .navbar-toggler { border-color: var(--border-strong); }
.tm-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%239aa8c7' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.theme-toggle {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    transition: .25s;
}
.theme-toggle:hover { background: var(--surface-2); transform: translateY(-2px); }

/* ---------------- Nav icons + link content ---------------- */
.tm-navbar .nav-link { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tm-navbar .nav-ico { font-size: 13px; opacity: .8; }
.tm-navbar .nav-link:hover .nav-ico,
.tm-navbar .nav-link.active .nav-ico { opacity: 1; }
.tm-navbar .nav-admin { color: var(--accent); }
.tm-navbar .nav-admin:hover, .tm-navbar .nav-admin.active { color: var(--accent); }

/* Remove the sliding underline on dropdown toggles (looks odd with caret) */
.tm-navbar .dropdown-toggle::after { margin-left: 4px; vertical-align: middle; border-top-color: currentColor; }
.tm-more .nav-link.dropdown-toggle::after { display: inline-block; }

/* ---------------- Themed dropdown menus ---------------- */
.tm-dropdown.dropdown-menu {
    background: color-mix(in srgb, var(--bg-2) 94%, transparent);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
    padding: 8px;
    margin-top: 10px;
    min-width: 220px;
    animation: tmDropIn .16s ease-out;
}
@keyframes tmDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tm-dropdown .dropdown-item {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.tm-dropdown .dropdown-item i { width: 18px; text-align: center; font-size: 14px; }
.tm-dropdown .dropdown-item:hover,
.tm-dropdown .dropdown-item:focus {
    background: var(--surface);
    color: var(--text);
    transform: translateX(2px);
}
.tm-dropdown .dropdown-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-700));
    color: #fff;
}
.tm-dropdown .dropdown-item.text-danger { color: var(--danger); }
.tm-dropdown .dropdown-item.text-danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tm-dropdown .dropdown-divider { border-color: var(--border); opacity: 1; margin: 6px 4px; }

/* User menu button + avatar */
.tm-user .btn-ghost { display: inline-flex; align-items: center; gap: 8px; }
.tm-user .btn-ghost::after { border-top-color: currentColor; }
.nav-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--border-strong);
}

/* Collapsed (mobile) nav polish */
@media (max-width: 991.98px) {
    .tm-navbar .navbar-collapse {
        margin-top: 12px;
        padding: 12px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 16px;
    }
    .tm-navbar .navbar-nav { gap: 2px; }
    .tm-navbar .nav-link { padding: 12px 14px !important; }
    .tm-navbar .nav-link::after { display: none; }
    .tm-dropdown.dropdown-menu {
        border: none;
        box-shadow: none;
        background: var(--surface-2);
        margin: 4px 0 4px 14px;
        animation: none;
    }
    .tm-nav-actions { margin-top: 10px; justify-content: flex-start; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding: 90px 0 70px;
    position: relative;
}
.hero h1 {
    font-size: clamp(36px, 6vw, 68px);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 22px;
}
.hero .lead {
    font-size: 19px;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 32px;
}
.gradient-text {
    background: linear-gradient(120deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border);
    padding: 8px 14px; border-radius: 999px;
}
.hero-badge i { color: var(--success); }

/* Live demo card */
.demo-card { padding: 26px; border-radius: var(--radius-lg); }
.demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.demo-dots span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.demo-dots span:nth-child(1) { background: #ef4444; }
.demo-dots span:nth-child(2) { background: #f59e0b; }
.demo-dots span:nth-child(3) { background: #22c55e; }
.demo-text {
    font-size: 20px; line-height: 1.9; letter-spacing: .01em;
    font-weight: 500; min-height: 120px;
}
.demo-text .typed { color: var(--success); }
.demo-text .cursor {
    background: var(--primary); color: #fff; border-radius: 3px;
    padding: 1px 2px; animation: blink 1s steps(1) infinite;
}
.demo-text .pending { color: var(--text-muted); }
@keyframes blink { 50% { opacity: .25; } }
.demo-stats { display: flex; gap: 14px; margin-top: 20px; }
.demo-stat { flex: 1; text-align: center; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.demo-stat b { display: block; font-family: var(--font-display); font-size: 26px; color: var(--text); }
.demo-stat small { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ==========================================================================
   Stats band
   ========================================================================== */
.stat-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-item { text-align: center; padding: 22px 10px; }
.stat-item h3 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; margin: 0; }
.stat-item h3 .gradient-text { font-weight: 800; }
.stat-item p { color: var(--text-muted); margin: 4px 0 0; font-weight: 500; }

/* ==========================================================================
   Feature cards
   ========================================================================== */
.feature-card {
    height: 100%;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: .3s;
}
.feature-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 54px; height: 54px; border-radius: 14px;
    display: grid; place-items: center; font-size: 22px;
    margin-bottom: 18px;
    background: color-mix(in srgb, var(--primary) 16%, transparent);
    color: var(--primary);
}
.feature-icon.accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.feature-icon.success { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.feature-card h4 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 15px; }

/* ==========================================================================
   Exam category pills / cards
   ========================================================================== */
.exam-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    transition: .25s; height: 100%;
}
.exam-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.exam-card .badge-icon {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px;
    display: grid; place-items: center; font-size: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
}
.exam-card b { display: block; color: var(--text); font-family: var(--font-display); }
.exam-card span { color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   Language showcase
   ========================================================================== */
.lang-card { padding: 30px; border-radius: var(--radius-lg); height: 100%; }
.lang-card .lang-sample {
    font-size: 22px; line-height: 1.8; padding: 18px;
    border-radius: var(--radius-sm); background: var(--surface-2);
    border: 1px solid var(--border); margin: 18px 0;
}
.lang-flag {
    width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center;
    font-size: 20px; color: #fff; margin-bottom: 8px;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testi-card { padding: 26px; border-radius: var(--radius); height: 100%; }
.testi-card .stars { color: var(--accent); margin-bottom: 12px; }
.testi-card p { color: var(--text); font-size: 15px; }
.testi-user { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testi-avatar {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent));
}
.testi-user b { display: block; font-size: 14px; }
.testi-user small { color: var(--text-muted); }

/* ==========================================================================
   FAQ (Bootstrap accordion themed)
   ========================================================================== */
.tm-accordion .accordion-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) !important; margin-bottom: 12px; overflow: hidden; }
.tm-accordion .accordion-button { background: transparent; color: var(--text); font-weight: 600; font-family: var(--font-display); }
.tm-accordion .accordion-button:not(.collapsed) { background: var(--surface-2); color: var(--text); box-shadow: none; }
.tm-accordion .accordion-button:focus { box-shadow: none; border: none; }
.tm-accordion .accordion-body { color: var(--text-muted); }
.tm-accordion .accordion-button::after { filter: invert(.5); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
    border-radius: var(--radius-lg);
    padding: 56px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-700), var(--primary)), var(--surface);
    color: #fff;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.cta-band h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); font-weight: 800; }
.cta-band p { color: rgba(255, 255, 255, .85); font-size: 18px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.tm-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 56px 0 28px;
    color: var(--text-muted);
}
.tm-footer h6 { color: var(--text); font-weight: 700; margin-bottom: 16px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.tm-footer a { color: var(--text-muted); display: block; padding: 5px 0; transition: .2s; }
.tm-footer a:hover { color: var(--primary); }
.tm-footer .brand-line { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.tm-footer .footer-bottom { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 22px; font-size: 14px; }
.tm-footer .social { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface); border: 1px solid var(--border); margin-right: 8px; transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease; }
.tm-footer .social i { transition: transform .2s ease; }
.tm-footer .social:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-3px) scale(1.08); box-shadow: 0 8px 20px rgba(47, 107, 255, .35); }
.tm-footer .social:hover i { transform: scale(1.12); }

/* Premium footer grid: brand column spans wide, then 6 link columns */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(6, 1fr);
    gap: 32px 24px;
}
.footer-brand-col { min-width: 0; }
.footer-tagline { max-width: 320px; font-size: 14px; line-height: 1.7; }
.footer-social { margin-top: 18px; display: flex; gap: 8px; }
.footer-social .social { margin-right: 0; }
.footer-links { min-width: 0; }
.footer-links h6 { margin-bottom: 14px; }
.footer-links a { font-size: 14px; }
@media (max-width: 991.98px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
    .footer-tagline { max-width: none; }
}

/* ==========================================================================
   Auth pages (login / register / forgot / otp)
   ========================================================================== */
.auth-page { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 60px 16px; }

.glass-card {
    width: 100%;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}
.auth-title { font-size: clamp(30px, 4vw, 42px); font-weight: 800; text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 30px; font-size: 16px; }

.form-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }

.auth-input .input-group-text {
    width: 52px; justify-content: center;
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-right: none;
    color: var(--primary);
    border-radius: 12px 0 0 12px;
}
.form-control {
    height: 54px;
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 16px;
    border-radius: 12px;
}
.auth-input .form-control { border-left: none; border-radius: 0 12px 12px 0; }
.form-control:focus {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent);
}
.form-control::placeholder { color: var(--text-muted); }

.password-toggle {
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-left: none;
    color: var(--text-muted);
    border-radius: 0 12px 12px 0;
}
.password-toggle:hover { color: var(--text); }

.auth-btn, .glass-card .btn-primary {
    width: 100%; height: 54px; margin-top: 10px;
    font-size: 17px; font-weight: 600; border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-700));
    color: #fff;
    box-shadow: 0 12px 28px rgba(47, 107, 255, .32);
    transition: .25s;
}
.auth-btn:hover, .glass-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(47, 107, 255, .42); }

.form-check-label { color: var(--text-muted); }
.form-check-input { background: var(--input-bg); border: 1px solid var(--border-strong); }
.form-check-input:checked { background: var(--primary); border-color: var(--primary); }
.forgot-link, .register-link { color: var(--primary); font-weight: 600; margin-left: 6px; }
.forgot-link:hover, .register-link:hover { color: var(--accent); }

.password-strength { height: 8px; background: var(--surface-2); border-radius: 20px; margin-top: 12px; overflow: hidden; }
#strengthBar { height: 100%; width: 0; background: var(--danger); transition: .35s; border-radius: 20px; }
#strengthText, #matchText { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; }

/* ---------------- Typing engine highlight classes ---------------- */
.correct { color: var(--success); }
.wrong { color: var(--danger); background: color-mix(in srgb, var(--danger) 18%, transparent); border-radius: 3px; }
.current { background: var(--primary); color: #fff; border-radius: 3px; padding: 1px 2px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
    .tm-navbar .navbar-collapse { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
    .section { padding: 64px 0; }
    .cta-band { padding: 36px 22px; }
}
@media (max-width: 575px) {
    .hero { padding: 56px 0 40px; }
    .demo-stats { flex-direction: column; }
}

/* ============================================================
   Global polish layer
   ============================================================ */

/* Custom scrollbar (Firefox + WebKit) */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--primary) 55%, var(--border-strong)); }

/* Consistent, accessible focus rings for keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
/* Remove the sticky focus ring on mouse click while keeping it for keyboard */
:focus:not(:focus-visible) { outline: none; }

/* Selection color */
::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); color: var(--text); }

/* Smooth scrolling + anchor offset for the sticky navbar */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

/* Skeleton loaders */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--text) 8%, transparent),
        transparent
    );
    animation: skeletonSweep 1.4s ease-in-out infinite;
}
.skeleton.line { height: 14px; margin-bottom: 10px; }
.skeleton.line.sm { width: 55%; }
@keyframes skeletonSweep { 100% { transform: translateX(100%); } }

/* Subtle press feedback for buttons */
.btn { transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.btn:active { transform: translateY(1px) scale(.99); }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
