/* ============================================================
   nodmekacademy — Modern UI Overrides
   Layered on top of styles.css for enhanced visual polish.
   ============================================================ */

/* ── Design tokens ── */
:root {
    --nma-orange: #f97316;
    --nma-orange-dark: #ea580c;
    --nma-purple: #7c3aed;
    --nma-purple-light: #a78bfa;
    --nma-gradient: linear-gradient(135deg, #f97316, #7c3aed);
    --nma-gradient-soft: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(124,58,237,0.12));

    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-gray: #f1f5f9;
    --text-main: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 28px rgba(0,0,0,0.09);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.12);
}

html[data-theme="dark"] {
    --bg-body: #0c1221;
    --bg-card: #1a2332;
    --bg-gray: #1e293b;
    --text-main: #f1f5f9;
    --text-gray: #94a3b8;
    --border-color: #2d3f55;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
    --shadow-lg: 0 10px 28px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.5);
}

body { background: var(--bg-body); color: var(--text-main); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

/* ── Selection ── */
::selection { background: rgba(249,115,22,0.2); color: var(--text-main); }

/* ── Focus ring ── */
:focus-visible { outline: 2px solid var(--nma-orange); outline-offset: 2px; border-radius: 4px; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', 'Inter', sans-serif; letter-spacing: -0.02em; }
.gradient-text {
    background: var(--nma-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-title { font-size: 1.4rem; font-weight: 700; color: var(--text-main); margin-bottom: 1.25rem; }
.section-subtitle { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 1.5rem; }

/* ── Cards ── */
.card, .codemy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .codemy-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-glass {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.5);
}
html[data-theme="dark"] .card-glass {
    background: rgba(26,35,50,0.7);
    border-color: rgba(255,255,255,0.08);
}

/* ── Buttons ── */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, var(--nma-orange), var(--nma-orange-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(249,115,22,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(249,115,22,0.5); color: #fff; }
.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--border-color); }
.btn-gradient {
    background: var(--nma-gradient);
    color: #fff;
    box-shadow: 0 2px 12px rgba(124,58,237,0.3);
}
.btn-gradient:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(124,58,237,0.45); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--border-color); color: var(--text-main); }
.btn-ghost:hover { background: var(--bg-gray); border-color: transparent; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; border-radius: 6px; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; border-radius: 10px; }
.btn-pill { border-radius: 999px; }
.btn-icon { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 8px; }

/* ── Badges / Pills ── */
.badge-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.badge-orange { background: rgba(249,115,22,0.12); color: #ea580c; }
.badge-purple { background: rgba(124,58,237,0.1); color: #7c3aed; }
.badge-green { background: rgba(34,197,94,0.1); color: #16a34a; }
.badge-blue { background: rgba(59,130,246,0.1); color: #2563eb; }
.badge-red { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-gray { background: var(--bg-gray); color: var(--text-gray); }

/* ── Forms ── */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.55rem 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--nma-orange);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
    outline: none;
}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: var(--bg-gray);
    border-color: var(--border-color);
    color: var(--text-main);
}
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-gray); margin-bottom: 0.4rem; letter-spacing: 0.02em; }
.input-group-text { background: var(--bg-gray); border: 1.5px solid var(--border-color); border-radius: 8px; color: var(--text-gray); }

/* ── Tables ── */
.table { border-collapse: separate; border-spacing: 0; }
.table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-gray); font-weight: 700; padding: 0.75rem 1rem; background: var(--bg-gray); border-bottom: 1px solid var(--border-color); }
.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover td { background: rgba(249,115,22,0.04); }
.table-wrapper { border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }

/* ── Navbar polish ── */
.codemy-navbar .nav-link { font-weight: 500; font-size: 0.9rem; border-radius: 8px; transition: all 0.15s; }
.codemy-navbar .nav-link:hover { background: rgba(249,115,22,0.08); color: var(--nma-orange) !important; }
.codemy-navbar .nav-link.active { background: rgba(249,115,22,0.1); color: var(--nma-orange) !important; }
.codemy-navbar .dropdown-menu { border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 0.5rem; }
.codemy-navbar .dropdown-item { border-radius: 6px; font-size: 0.875rem; padding: 0.5rem 0.75rem; color: var(--text-main); transition: all 0.12s; }
.codemy-navbar .dropdown-item:hover { background: rgba(249,115,22,0.08); color: var(--nma-orange); }

/* ── Hero section ── */
.hero { padding: 3rem 1rem 2.5rem; }
.hero-title { font-size: clamp(1.75rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.15; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1rem; color: var(--text-gray); line-height: 1.7; margin-bottom: 1.5rem; }
.hero-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Stat cards ── */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-main);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: var(--text-main); }
.stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; color: #fff; flex-shrink: 0;
}
.stat-icon.orange { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }
.stat-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 4px 12px rgba(124,58,237,0.3); }
.stat-icon.green { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
.stat-icon.blue { background: linear-gradient(135deg, #2563eb, #3b82f6); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.stat-icon.gold { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }
.stat-icon.rose { background: linear-gradient(135deg, #e11d48, #f43f5e); box-shadow: 0 4px 12px rgba(244,63,94,0.3); }
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; margin-bottom: 0.2rem; }
.stat-label { font-size: 0.8rem; color: var(--text-gray); font-weight: 500; }
.stat-trend { font-size: 0.75rem; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.2rem; }
.stat-trend.up { color: #16a34a; }
.stat-trend.down { color: #dc2626; }

/* ── Quick action cards ── */
.quick-action {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.875rem;
}
.quick-action:hover { background: rgba(249,115,22,0.06); border-color: rgba(249,115,22,0.3); color: var(--nma-orange); transform: translateX(2px); }
.quick-action i { width: 20px; text-align: center; color: var(--text-gray); transition: color 0.15s; }
.quick-action:hover i { color: var(--nma-orange); }
.quick-action-arrow { margin-left: auto; color: var(--text-gray); font-size: 0.75rem; }

/* ── Section headers ── */
.section-header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}
.section-header-line h2, .section-header-line h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.section-header-line .view-all { font-size: 0.8rem; color: var(--nma-orange); font-weight: 600; white-space: nowrap; }

/* ── Progress bars ── */
.progress-bar-nma { height: 6px; background: var(--bg-gray); border-radius: 999px; overflow: hidden; }
.progress-bar-nma-fill { height: 100%; background: var(--nma-gradient); border-radius: inherit; transition: width 0.5s ease; }

/* ── Avatar ── */
.avatar { border-radius: 50%; object-fit: cover; }
.avatar-initial { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--nma-gradient); }

/* ── Chips / tags ── */
.tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; background: var(--bg-gray); color: var(--text-gray); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-gray); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; margin-bottom: 1rem; }

/* ── Toast ── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 99999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast-nma { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.85rem 1.1rem; box-shadow: var(--shadow-lg); font-size: 0.875rem; display: flex; align-items: center; gap: 0.6rem; animation: toast-in 0.3s ease; min-width: 260px; max-width: 380px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.toast-nma.success { border-left: 3px solid #22c55e; }
.toast-nma.error { border-left: 3px solid #ef4444; }
.toast-nma.info { border-left: 3px solid #3b82f6; }
.toast-nma.warning { border-left: 3px solid #f59e0b; }

/* ── Skeleton loading ── */
.skeleton { background: linear-gradient(90deg, var(--bg-gray) 25%, var(--border-color) 50%, var(--bg-gray) 75%); background-size: 200% 100%; animation: skeleton-wave 1.5s infinite; border-radius: 6px; }
@keyframes skeleton-wave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Footer ── */
.footer {
    background: linear-gradient(180deg, #0f172a 0%, #0a0f1e 100%);
    color: rgba(255,255,255,0.7);
    padding: 3.5rem 0 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 2.5rem; display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
@media (max-width: 900px) { .footer-container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-container { grid-template-columns: 1fr; } }
.footer-brand .logo-text, .footer-brand .nma-brand-text, .footer-brand .nma-nodmek { color: #fff !important; }
.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.45); margin-top: 0.75rem; line-height: 1.65; }
.footer-column h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); font-weight: 700; margin-bottom: 0.85rem; }
.footer-column a { display: block; color: rgba(255,255,255,0.6); font-size: 0.875rem; padding: 0.25rem 0; transition: color 0.15s; }
.footer-column a:hover { color: #f97316; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 1.25rem 1.5rem; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { color: rgba(255,255,255,0.35); transition: color 0.15s; }
.footer-legal a:hover { color: #f97316; }

/* ── Admin dashboard specific ── */
.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.admin-stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff; flex-shrink: 0; }
.admin-stat-icon.orange { background: linear-gradient(135deg, #f97316, #ea580c); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }
.admin-stat-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 4px 12px rgba(124,58,237,0.3); }
.admin-stat-icon.green { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
.admin-stat-icon.gold { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }
.admin-stat-icon.blue { background: linear-gradient(135deg, #2563eb, #3b82f6); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.admin-stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1.1; }
.admin-stat-label { font-size: 0.78rem; color: var(--text-gray); margin-top: 0.15rem; font-weight: 500; }
.admin-table-modern th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-gray); font-weight: 700; padding: 0.75rem 1rem; background: var(--bg-gray); }
.admin-table-modern td { padding: 0.85rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--border-color); }
.admin-table-modern tr:hover td { background: rgba(249,115,22,0.03); }

/* ── Admin sidebar active ── */
.admin-sidebar { background: var(--bg-card); }
html[data-theme="dark"] .admin-sidebar { background: var(--bg-gray); }

/* ── Content section padding ── */
.admin-content { padding: 1.5rem; }
@media (max-width: 767px) { .admin-content { padding: 1rem; } }

/* ── Search bar ── */
.search-bar {
    display: flex; align-items: center; gap: 0.6rem;
    border: 1.5px solid var(--border-color); border-radius: 8px;
    background: var(--bg-card); padding: 0.5rem 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within { border-color: var(--nma-orange); box-shadow: 0 0 0 3px rgba(249,115,22,0.12); }
.search-bar i { color: var(--text-gray); }
.search-bar input { flex: 1; border: none; background: transparent; outline: none; font-size: 0.9rem; color: var(--text-main); }

/* ── Course / content card ── */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}
.content-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.content-card-thumb { height: 160px; background: var(--nma-gradient-soft); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--nma-orange); }
.content-card-body { padding: 1rem 1.1rem; }
.content-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.content-card-meta { font-size: 0.78rem; color: var(--text-gray); }

/* ── Page header ── */
.page-header {
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.4rem; font-weight: 800; margin: 0 0 0.25rem; }
.page-header p { font-size: 0.875rem; color: var(--text-gray); margin: 0; }

/* ── Responsive helpers ── */
@media (max-width: 576px) {
    .hero-title { font-size: 1.6rem; }
    .stat-card { flex-direction: column; text-align: center; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    .stat-value { font-size: 1.4rem; }
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
.animate-in { animation: fadeInUp 0.4s ease both; }

/* ── Glow effects for dark mode ── */
html[data-theme="dark"] .btn-primary { box-shadow: 0 0 0 1px rgba(249,115,22,0.2), 0 2px 8px rgba(249,115,22,0.3); }
html[data-theme="dark"] .nma-brand-icon { box-shadow: 0 2px 12px rgba(249,115,22,0.4); }

/* ── Landing page feature boxes ── */
.feature-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}
.feature-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-box-icon { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; }
.feature-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-box p { font-size: 0.85rem; color: var(--text-gray); margin: 0; line-height: 1.6; }

/* ── Code blocks ── */
pre, code { font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace; }
pre { background: var(--bg-gray); border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: 0.875rem; line-height: 1.6; }
code:not(pre code) { background: var(--bg-gray); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.875em; color: var(--nma-orange); }
html[data-theme="dark"] pre { background: #0a0f1e; border-color: #1e293b; }

/* ── Notification bell ── */
.notification-bell { background: none; border: none; cursor: pointer; position: relative; padding: 0.4rem; border-radius: 8px; transition: background 0.15s; }
.notification-bell:hover { background: rgba(249,115,22,0.08); }
.notification-bell-icon { font-size: 1.15rem; color: var(--text-gray); }
.notification-badge { position: absolute; top: 2px; right: 2px; background: #ef4444; color: #fff; font-size: 0.6rem; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid var(--bg-card); }

/* ── Profile avatar in nav ── */
.profile-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(249,115,22,0.3); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.8rem; background: none; padding: 0; margin: 0; }
.breadcrumb-item a { color: var(--nma-orange); }
.breadcrumb-item.active { color: var(--text-gray); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--border-color); }

/* ── Admin content padding fix ── */
.admin-main-body { padding: 1.5rem; }
@media (max-width: 767px) { .admin-main-body { padding: 1rem; } }

/* ══════════════════════════════════════════════════════════════
   CINEMATIC NAV — Icon + Label premium buttons (2026)
══════════════════════════════════════════════════════════════ */

/* ── Home / Dashboard cinematic pill ── */
.cnav-icon {
    display:inline-flex; align-items:center; gap:0.32rem;
    padding:0.3rem 0.65rem 0.3rem 0.5rem !important; border-radius:0.7rem;
    position:relative; overflow:visible; white-space:nowrap;
    background:linear-gradient(135deg,rgba(99,102,241,.06),rgba(249,115,22,.04));
    border:1.5px solid rgba(99,102,241,.1);
    transition:all .28s cubic-bezier(.4,0,.2,1);
    text-decoration:none;
}
.cnav-icon i {
    font-size:0.82rem; position:relative; z-index:2;
    background:linear-gradient(135deg,#a78bfa,#f97316);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
    transition:all .28s ease;
}
.cnav-icon .cnav-label {
    font-size:0.78rem; font-weight:800; position:relative; z-index:2;
    background:linear-gradient(135deg,#a78bfa,#f97316);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
    transition:all .28s ease;
}
.cnav-icon:hover {
    transform:translateY(-2px);
    border-color:rgba(249,115,22,.3);
    box-shadow:0 6px 20px rgba(249,115,22,.18), 0 0 24px rgba(99,102,241,.08);
    background:linear-gradient(135deg,rgba(99,102,241,.1),rgba(249,115,22,.06));
    text-decoration:none;
}
.cnav-icon:hover i, .cnav-icon:hover .cnav-label { filter:brightness(1.3); }
.cnav-icon.active {
    border-color:rgba(249,115,22,.3);
    background:linear-gradient(135deg,rgba(249,115,22,.12),rgba(99,102,241,.08));
    box-shadow:0 4px 16px rgba(249,115,22,.15);
}
.cnav-icon.active i, .cnav-icon.active .cnav-label { filter:brightness(1.2); }
/* Dashboard rocket animation */
.cnav-icon-dash:hover i { animation:cnav-rocket-launch .6s ease; }
@keyframes cnav-rocket-launch {
    0%   { transform:translateY(0)   scale(1); }
    30%  { transform:translateY(-3px) scale(1.15); }
    60%  { transform:translateY(-1px) scale(1.05); }
    100% { transform:translateY(0)   scale(1); }
}

/* ── Plain icon + text links (Leaderboard, Pricing, Admin) ── */
.cnav-icon-text {
    display:inline-flex; align-items:center; gap:0.35rem;
    font-size:0.82rem; font-weight:700; color:inherit;
    padding:0.4rem 0.7rem !important; border-radius:0.7rem;
    transition:all .18s ease; white-space:nowrap; text-decoration:none;
}
.cnav-icon-text i { font-size:0.78rem; opacity:0.7; }
.cnav-icon-text:hover, .cnav-icon-text.active { background:rgba(249,115,22,.08); text-decoration:none; }
.cnav-icon-text:hover i, .cnav-icon-text.active i { opacity:1; color:var(--nma-orange, #f97316); }

/* ── Student Arena button ── */
.cnav-arena {
    display:inline-flex; align-items:center; gap:5px;
    padding:0.3rem 0.65rem 0.3rem 0.45rem !important; border-radius:0.7rem;
    background:linear-gradient(135deg,rgba(249,115,22,.08),rgba(99,102,241,.06));
    border:1px solid rgba(249,115,22,.15);
    transition:all .25s; white-space:nowrap; text-decoration:none;
}
.cnav-arena:hover {
    border-color:rgba(249,115,22,.35);
    box-shadow:0 0 12px rgba(249,115,22,.12);
    transform:translateY(-1px); text-decoration:none;
}
.cnav-arena-bolt {
    width:22px; height:22px; border-radius:50%;
    background:linear-gradient(135deg,#f97316,#6366f1);
    display:inline-flex; align-items:center; justify-content:center;
    font-size:10px; color:#fff; flex-shrink:0;
}
.cnav-arena-label {
    font-size:0.78rem; font-weight:800;
    background:linear-gradient(135deg,#f97316,#a855f7);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.cnav-arena-live {
    display:inline-flex; align-items:center; gap:3px;
    font-size:8px; font-weight:800; color:#22c55e;
    background:rgba(34,197,94,.1); padding:1px 5px; border-radius:99px;
    text-transform:uppercase; letter-spacing:.04em;
}
.cnav-arena-live::before {
    content:''; width:4px; height:4px; border-radius:50%;
    background:#22c55e; animation:cnav-pulse 1.5s ease-in-out infinite;
    display:inline-block;
}
@keyframes cnav-pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%     { opacity:.4; transform:scale(.7); }
}

/* ── More / Programming cinematic dropdown trigger ── */
.cnav-more {
    display:inline-flex; align-items:center; gap:0.32rem;
    padding:0.3rem 0.65rem 0.3rem 0.5rem !important; border-radius:0.7rem;
    position:relative; white-space:nowrap; text-decoration:none;
    background:linear-gradient(135deg,rgba(168,85,247,.06),rgba(249,115,22,.04));
    border:1.5px solid rgba(168,85,247,.12);
    transition:all .28s cubic-bezier(.4,0,.2,1);
}
.cnav-more i {
    font-size:0.82rem;
    background:linear-gradient(135deg,#ec4899,#f97316);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
    transition:all .28s ease;
}
.cnav-more .cnav-label {
    font-size:0.78rem; font-weight:800;
    background:linear-gradient(135deg,#ec4899,#f97316);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
    transition:all .28s ease;
}
.cnav-more:hover {
    transform:translateY(-2px);
    border-color:rgba(236,72,153,.3);
    box-shadow:0 6px 20px rgba(236,72,153,.18), 0 0 24px rgba(249,115,22,.08);
    background:linear-gradient(135deg,rgba(168,85,247,.12),rgba(249,115,22,.08));
    text-decoration:none;
}
.cnav-more:hover i, .cnav-more:hover .cnav-label { filter:brightness(1.3); }
.cnav-more.active {
    border-color:rgba(236,72,153,.25);
    background:linear-gradient(135deg,rgba(236,72,153,.1),rgba(249,115,22,.06));
}
.cnav-more.dropdown-toggle::after { display:none; }

/* ── Dropdown label rows ── */
.cnav-dd-label {
    display:block;
    padding:5px 14px 2px; font-size:9px; font-weight:800; color:#94a3b8;
    text-transform:uppercase; letter-spacing:.08rem;
}
/* Premium dropdown polish */
.cnav-dropdown-premium {
    min-width:256px; padding:0.6rem 0.4rem;
    border:1px solid rgba(99,102,241,.12) !important;
    border-radius:1rem !important;
    box-shadow:0 16px 48px rgba(99,102,241,.12), 0 4px 12px rgba(0,0,0,.07) !important;
}
.cnav-dropdown-premium .dropdown-item {
    border-radius:0.5rem; font-size:0.875rem;
    transition:background .15s, color .15s;
}
.cnav-dropdown-premium .dropdown-item:hover { background:rgba(249,115,22,.07); color:var(--nma-orange,#f97316); }

/* ── Locked mode / upsell card in dropdown ── */
.nav-locked-card {
    background:linear-gradient(135deg,rgba(99,102,241,.04),rgba(249,115,22,.03));
    border:1.5px dashed rgba(99,102,241,.2);
    border-radius:14px; padding:14px 16px; margin:8px 6px;
    position:relative; overflow:hidden;
}
.nav-locked-card::before {
    content:''; position:absolute; top:0; right:0; width:60px; height:60px;
    background:radial-gradient(circle,rgba(249,115,22,.1) 0%,transparent 70%);
    border-radius:0 14px 0 0; pointer-events:none;
}
.nav-locked-card::after {
    content:'\f023'; font-family:'Font Awesome 6 Free'; font-weight:900;
    position:absolute; top:10px; right:12px; font-size:12px;
    background:linear-gradient(135deg,#a855f7,#f97316);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
    opacity:0.6;
}
.nav-locked-title {
    font-size:13px; font-weight:800; margin-bottom:2px;
    background:linear-gradient(135deg,#475569,#6366f1);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.nav-locked-desc { font-size:11px; color:#94a3b8; margin-bottom:10px; line-height:1.4; }
.nav-locked-btn {
    display:inline-flex; align-items:center; gap:5px;
    background:linear-gradient(135deg,#6366f1,#a855f7); color:#fff !important;
    border:none; border-radius:8px; padding:6px 16px;
    font-size:11px; font-weight:700; text-decoration:none !important;
    transition:all 0.25s; box-shadow:0 4px 12px rgba(99,102,241,.2);
}
.nav-locked-btn:hover {
    transform:translateY(-2px) scale(1.02);
    box-shadow:0 6px 18px rgba(99,102,241,.35); color:#fff !important;
}
.nav-locked-preview {
    display:flex; gap:6px; flex-wrap:wrap;
    margin-top:8px; padding-top:8px; border-top:1px solid rgba(148,163,184,.1);
}
.nav-locked-tag {
    font-size:10px; font-weight:700; color:#6366f1;
    background:rgba(99,102,241,.06); padding:3px 8px; border-radius:6px;
    display:inline-flex; align-items:center; gap:3px;
    border:1px solid rgba(99,102,241,.08);
}
.nav-locked-tag i { font-size:9px; color:#a855f7; }

/* ── Dark mode adjustments ── */
html[data-theme="dark"] .cnav-icon {
    background:linear-gradient(135deg,rgba(99,102,241,.12),rgba(249,115,22,.08));
    border-color:rgba(99,102,241,.18);
}
html[data-theme="dark"] .cnav-more {
    background:linear-gradient(135deg,rgba(168,85,247,.1),rgba(249,115,22,.06));
    border-color:rgba(168,85,247,.2);
}
html[data-theme="dark"] .nav-locked-card { border-color:rgba(99,102,241,.25); }

/* ── "Course" mega menu — W3Schools-style sidebar + content, dynamic catalog ── */
.cnav-mega-wrap { position:static; }
.cnav-mega-dropdown {
    width:min(940px, 95vw);
    max-width:95vw;
    padding:0;
    left:50% !important;
    transform:translateX(-50%) !important;
    right:auto !important;
    overflow:hidden;
    border-radius:1.15rem !important;
    border:1px solid rgba(148,163,184,.16) !important;
    box-shadow:0 24px 60px rgba(15,23,42,.18), 0 6px 18px rgba(15,23,42,.08) !important;
}
.cnav-mega-panel { position:relative; max-height:76vh; }
.cnav-mega-close {
    position:absolute; top:0.9rem; right:1rem; z-index:3;
    width:28px; height:28px; border-radius:50%; border:none;
    background:rgba(148,163,184,.12); color:#64748b;
    display:flex; align-items:center; justify-content:center;
    font-size:0.8rem; cursor:pointer; transition:background .15s, color .15s;
}
.cnav-mega-close:hover { background:rgba(249,115,22,.14); color:#f97316; }
.cnav-mega-body { display:flex; max-height:76vh; }

/* Left sidebar — category tabs */
.cnav-mega-sidebar {
    flex:0 0 208px; padding:0.75rem 0.6rem; overflow-y:auto;
    display:flex; flex-direction:column; gap:0.18rem;
    background:linear-gradient(180deg, rgba(99,102,241,.05), rgba(148,163,184,.03));
    border-right:1px solid rgba(148,163,184,.14);
}
.cnav-mega-tab {
    display:flex; align-items:center; gap:0.6rem; width:100%;
    border:none; background:transparent; text-align:left;
    padding:0.5rem 0.6rem; font-size:0.86rem; font-weight:700; color:#475569;
    border-radius:0.7rem; cursor:pointer; position:relative;
    transition:background .16s, color .16s, box-shadow .16s, transform .16s;
}
.cnav-mega-tab-icon {
    width:30px; height:30px; flex-shrink:0; border-radius:0.55rem;
    display:flex; align-items:center; justify-content:center;
    background:color-mix(in srgb, var(--tab-accent, #6366f1) 14%, transparent);
    color:var(--tab-accent, #6366f1); font-size:0.9rem;
    transition:background .16s, color .16s;
}
.cnav-mega-tab-name { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cnav-mega-tab-count {
    flex-shrink:0; font-size:10px; font-weight:800; color:#94a3b8;
    background:rgba(148,163,184,.16); padding:2px 8px; border-radius:99px;
    transition:background .16s, color .16s;
}
.cnav-mega-tab:hover { background:rgba(99,102,241,.07); color:#1e293b; transform:translateX(2px); }
.cnav-mega-tab.active {
    background:var(--bg-card,#fff); color:#1e293b;
    box-shadow:0 2px 10px rgba(99,102,241,.12), 0 0 0 1px rgba(99,102,241,.1);
}
.cnav-mega-tab.active .cnav-mega-tab-icon {
    background:var(--tab-accent, #6366f1); color:#fff;
}
.cnav-mega-tab.active .cnav-mega-tab-count {
    background:color-mix(in srgb, var(--tab-accent, #6366f1) 16%, transparent);
    color:var(--tab-accent, #6366f1);
}

/* Right content — panes swap per active tab */
.cnav-mega-content { flex:1 1 auto; min-width:0; position:relative; overflow-y:auto; }
.cnav-mega-pane {
    display:none; grid-template-columns:1.15fr 1fr; gap:0;
    padding:1.3rem 1.5rem;
}
.cnav-mega-pane.active { display:grid; }
.cnav-mega-col-courses { padding-right:1.5rem; border-right:1px solid rgba(148,163,184,.14); }
.cnav-mega-col-links { padding-left:1.5rem; display:flex; flex-direction:column; }
.cnav-mega-col-title {
    font-size:0.98rem; font-weight:800; color:#1e293b;
    margin-bottom:0.7rem;
}
.cnav-mega-list { list-style:none; margin:0 0 0.9rem; padding:0; display:flex; flex-direction:column; gap:0.1rem; }
.cnav-mega-list li a {
    display:flex; align-items:center; gap:0.6rem;
    font-size:0.85rem; font-weight:600; color:#475569;
    padding:0.5rem 0.55rem; border-radius:0.6rem;
    text-decoration:none; transition:background .15s, color .15s, transform .15s;
}
.cnav-mega-list li a i { font-size:0.78rem; color:#818cf8; flex-shrink:0; width:16px; text-align:center; }
.cnav-mega-list li a span { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cnav-mega-list li a:hover { background:rgba(99,102,241,.09); color:#4338ca; transform:translateX(3px); }
.cnav-mega-list li a:hover i { color:#4338ca; }
.cnav-mega-free {
    font-size:8px; font-weight:800; color:#059669;
    background:rgba(5,150,105,.1); padding:1px 5px; border-radius:5px;
    letter-spacing:.03em; margin-left:auto; flex-shrink:0;
}
.cnav-mega-cta {
    display:flex; align-items:center; justify-content:space-between;
    font-size:0.86rem; font-weight:800; color:#fff;
    background:linear-gradient(135deg, #6366f1, #4f46e5);
    border:none; box-shadow:0 4px 14px rgba(99,102,241,.32);
    border-radius:0.75rem; padding:0.7rem 0.95rem; text-decoration:none !important;
    transition:box-shadow .18s, transform .18s, filter .18s;
}
.cnav-mega-cta:hover { filter:brightness(1.06); transform:translateY(-1px); box-shadow:0 6px 20px rgba(99,102,241,.45); color:#fff; }
.cnav-mega-cta i { font-size:0.75rem; }
.cnav-mega-linkcard {
    display:flex; align-items:center; justify-content:space-between;
    font-size:0.92rem; font-weight:700; color:#334155;
    background:rgba(148,163,184,.08); border:1px solid rgba(148,163,184,.14);
    border-radius:0.8rem;
    padding:0.85rem 0.95rem; margin-bottom:0.65rem; text-decoration:none !important;
    transition:background .16s, color .16s, transform .16s, box-shadow .16s, border-color .16s;
}
.cnav-mega-linkcard > span { display:inline-flex; align-items:center; gap:0.6rem; }
.cnav-mega-linkcard > span i:first-child { font-size:1.05rem; width:22px; text-align:center; }
.cnav-mega-linkcard:hover {
    background:rgba(99,102,241,.08); color:#4338ca; transform:translateY(-2px);
    border-color:rgba(99,102,241,.28); box-shadow:0 6px 16px rgba(99,102,241,.16);
}
.cnav-mega-linkcard i:last-child { font-size:0.72rem; color:#94a3b8; }
.cnav-mega-linkcard:hover i:last-child { color:#4338ca; }
.cnav-mega-viewall {
    display:inline-flex; align-items:center; gap:0.4rem;
    font-size:0.88rem; font-weight:800; color:#6366f1;
    text-decoration:none !important; margin-top:auto; padding-top:0.4rem;
}
.cnav-mega-viewall:hover { color:#f97316; }
.cnav-mega-viewall i { font-size:0.7rem; }
.cnav-mega-empty { text-align:center; padding:2.2rem 1.2rem; color:#94a3b8; }
.cnav-mega-empty i { font-size:1.6rem; margin-bottom:0.5rem; display:block; }

html[data-theme="dark"] .cnav-mega-sidebar { background:linear-gradient(180deg, rgba(129,140,248,.08), rgba(15,23,42,.4)); border-right-color:rgba(148,163,184,.12); }
html[data-theme="dark"] .cnav-mega-tab { color:#94a3b8; }
html[data-theme="dark"] .cnav-mega-tab:hover { background:rgba(129,140,248,.12); color:#e2e8f0; }
html[data-theme="dark"] .cnav-mega-tab.active { background:rgba(30,41,59,.9); color:#f1f5f9; box-shadow:0 2px 10px rgba(0,0,0,.4), 0 0 0 1px rgba(129,140,248,.22); }
html[data-theme="dark"] .cnav-mega-tab-count { background:rgba(148,163,184,.16); color:#94a3b8; }
html[data-theme="dark"] .cnav-mega-col-title { color:#e2e8f0; }
html[data-theme="dark"] .cnav-mega-col-courses { border-right-color:rgba(148,163,184,.12); }
html[data-theme="dark"] .cnav-mega-list li a { color:#cbd5e1; }
html[data-theme="dark"] .cnav-mega-list li a:hover { background:rgba(129,140,248,.14); color:#c7d2fe; }
html[data-theme="dark"] .cnav-mega-list li a:hover i { color:#c7d2fe; }
html[data-theme="dark"] .cnav-mega-linkcard { background:rgba(148,163,184,.08); color:#cbd5e1; }
html[data-theme="dark"] .cnav-mega-close { background:rgba(148,163,184,.16); color:#94a3b8; }

/* ══════════════════════════════════════════════════════════════
   🎮 GAMIFIED MEGA MENU — animated glow border, quest-hub hero,
   glowing quest-card tabs, shimmering CTA, pulsing reward badges.
══════════════════════════════════════════════════════════════ */

/* Game-UI backdrop + animated rainbow glow border ring */
.cnav-mega-dropdown {
    background:
        radial-gradient(1100px 300px at 15% -12%, rgba(99,102,241,.12), transparent 60%),
        radial-gradient(900px 280px at 105% -5%, rgba(236,72,153,.10), transparent 60%),
        var(--bg-card, #fff) !important;
}
.cnav-mega-dropdown::before {
    content:""; position:absolute; inset:0; border-radius:inherit; padding:2px;
    background:linear-gradient(120deg,#6366f1,#a855f7,#ec4899,#f97316,#22c55e,#38bdf8,#6366f1);
    background-size:300% 300%;
    -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite:xor; mask-composite:exclude;
    animation:cnav-border-flow 7s linear infinite; pointer-events:none; z-index:5; opacity:.9;
}
@keyframes cnav-border-flow { 0%{background-position:0% 50%} 100%{background-position:300% 50%} }

/* Quest-hub hero banner. Extra right padding reserves space for the absolutely-positioned close (✕)
   button so the "Earn XP" chip never sits underneath it. */
.cnav-mega-hero {
    position:relative; overflow:hidden; display:flex; align-items:center; gap:0.7rem;
    padding:0.7rem 3.4rem 0.7rem 1.15rem; color:#fff;
    background:linear-gradient(120deg,#4f46e5 0%,#7c3aed 45%,#db2777 100%);
    background-size:180% 180%; animation:cnav-hero-shift 9s ease infinite;
}
@keyframes cnav-hero-shift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.cnav-mega-hero-badge {
    display:inline-flex; align-items:center; gap:0.35rem; flex-shrink:0;
    font-size:0.72rem; font-weight:800; letter-spacing:.03em;
    background:rgba(255,255,255,.2); padding:0.28rem 0.65rem; border-radius:99px;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);
}
.cnav-mega-hero-title { font-size:0.9rem; font-weight:800; flex:1 1 auto; min-width:0; text-shadow:0 1px 6px rgba(0,0,0,.18); }
.cnav-mega-hero-xp {
    display:inline-flex; align-items:center; gap:0.3rem; flex-shrink:0;
    font-size:0.72rem; font-weight:800; color:#fde68a;
    background:rgba(0,0,0,.18); padding:0.28rem 0.6rem; border-radius:99px;
}
.cnav-mega-hero-xp i { animation:cnav-bolt 1.8s ease-in-out infinite; }
@keyframes cnav-bolt { 0%,100%{transform:scale(1);opacity:.85} 50%{transform:scale(1.25);opacity:1} }
.cnav-mega-hero-glow {
    position:absolute; top:0; left:-40%; width:35%; height:100%; pointer-events:none;
    background:linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform:skewX(-20deg); animation:cnav-sweep 4.5s ease-in-out infinite;
}
@keyframes cnav-sweep { 0%,55%{left:-40%} 100%{left:130%} }

/* Quest-card tabs — glow + pop on hover, vibrant accent fill when active */
.cnav-mega-tab { overflow:hidden; }
.cnav-mega-tab:hover {
    background:color-mix(in srgb, var(--tab-accent,#6366f1) 10%, transparent);
    transform:translateX(3px) scale(1.015);
}
.cnav-mega-tab:hover .cnav-mega-tab-icon {
    box-shadow:0 0 12px color-mix(in srgb, var(--tab-accent,#6366f1) 55%, transparent);
    transform:rotate(-6deg) scale(1.08);
}
.cnav-mega-tab.active {
    background:linear-gradient(135deg, color-mix(in srgb, var(--tab-accent,#6366f1) 20%, var(--bg-card,#fff)), var(--bg-card,#fff));
    box-shadow:0 4px 18px color-mix(in srgb, var(--tab-accent,#6366f1) 32%, transparent),
               0 0 0 1px color-mix(in srgb, var(--tab-accent,#6366f1) 34%, transparent);
    transform:translateX(3px);
}
.cnav-mega-tab.active .cnav-mega-tab-icon {
    background:linear-gradient(135deg, var(--tab-accent,#6366f1), color-mix(in srgb, var(--tab-accent,#6366f1) 55%, #000));
    color:#fff; box-shadow:0 0 16px color-mix(in srgb, var(--tab-accent,#6366f1) 60%, transparent);
}
.cnav-mega-tab-icon { transition:transform .18s, box-shadow .18s, background .18s; }

/* Course rows — accent bar grows + glow on hover, icon pops */
.cnav-mega-list li a { position:relative; overflow:hidden; }
.cnav-mega-list li a::before {
    content:""; position:absolute; left:0; top:50%; width:3px; height:0; border-radius:0 3px 3px 0;
    background:linear-gradient(#6366f1,#a855f7); transform:translateY(-50%); transition:height .2s;
}
.cnav-mega-list li a:hover {
    background:linear-gradient(90deg, rgba(99,102,241,.14), rgba(168,85,247,.05));
    box-shadow:0 4px 14px rgba(99,102,241,.14);
}
.cnav-mega-list li a:hover::before { height:62%; }
.cnav-mega-list li a:hover i:first-child { transform:scale(1.2) rotate(-8deg); }
.cnav-mega-list li a i:first-child { transition:transform .18s; }

/* Reward "FREE" pill — glowing gem that pulses */
.cnav-mega-free {
    background:linear-gradient(135deg,#22c55e,#16a34a) !important; color:#fff !important;
    box-shadow:0 0 0 0 rgba(34,197,94,.5); animation:cnav-free-pulse 2.4s infinite;
}
@keyframes cnav-free-pulse {
    0%{box-shadow:0 0 0 0 rgba(34,197,94,.5)}
    70%{box-shadow:0 0 0 7px rgba(34,197,94,0)}
    100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}
}

/* CTA — animated gradient with a shine sweep */
.cnav-mega-cta {
    position:relative; overflow:hidden;
    background:linear-gradient(135deg,#6366f1,#a855f7 55%,#ec4899) !important;
    background-size:200% 100% !important; animation:cnav-cta-shift 5s ease infinite;
}
.cnav-mega-cta::after {
    content:""; position:absolute; top:0; left:-60%; width:45%; height:100%; pointer-events:none;
    background:linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    transform:skewX(-20deg); animation:cnav-sweep 3.4s ease-in-out infinite;
}
@keyframes cnav-cta-shift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.cnav-mega-cta:hover { transform:translateY(-2px) scale(1.02); }

/* Quick-link cards — gradient edge glow + icon pop on hover */
.cnav-mega-linkcard:hover {
    background:linear-gradient(90deg, rgba(99,102,241,.12), rgba(236,72,153,.06)) !important;
    border-color:rgba(124,58,237,.4) !important;
    box-shadow:0 8px 20px rgba(124,58,237,.2) !important;
}
.cnav-mega-linkcard > span i:first-child { transition:transform .18s; }
.cnav-mega-linkcard:hover > span i:first-child { transform:scale(1.25) rotate(-8deg); }

/* Close button sits on the hero now — make it legible on the gradient */
.cnav-mega-close { background:rgba(255,255,255,.22) !important; color:#fff !important; }
.cnav-mega-close:hover { background:rgba(255,255,255,.38) !important; color:#fff !important; }

html[data-theme="dark"] .cnav-mega-tab.active {
    background:linear-gradient(135deg, color-mix(in srgb, var(--tab-accent,#818cf8) 30%, #1e293b), rgba(30,41,59,.92));
    box-shadow:0 4px 18px rgba(0,0,0,.45), 0 0 0 1px color-mix(in srgb, var(--tab-accent,#818cf8) 40%, transparent);
}

@media (prefers-reduced-motion: reduce) {
    .cnav-mega-dropdown::before, .cnav-mega-hero, .cnav-mega-hero-glow, .cnav-mega-hero-xp i,
    .cnav-mega-cta, .cnav-mega-cta::after, .cnav-mega-free { animation:none !important; }
}

/* ── Header profile menu + notifications panel — modern, matching look ── */
@keyframes cnav-menu-pop { from { opacity:0; transform:translateY(-8px) scale(.98); } to { opacity:1; transform:none; } }

#auth-profile-dropdown {
    min-width:236px !important; padding:0.4rem !important;
    border-radius:16px !important; border:1px solid rgba(148,163,184,.18) !important;
    box-shadow:0 22px 48px rgba(15,23,42,.2), 0 4px 12px rgba(15,23,42,.08) !important;
    animation:cnav-menu-pop .16s ease;
}
#auth-profile-dropdown .profile-dropdown-item {
    border-radius:11px; margin:1px 0; transition:background .15s, transform .15s;
}
#auth-profile-dropdown .profile-dropdown-item a { font-weight:600; font-size:0.9rem; border-radius:11px; }
#auth-profile-dropdown .profile-dropdown-item i { width:20px; text-align:center; color:#6366f1; }
#auth-profile-dropdown .profile-dropdown-item:hover { background:rgba(99,102,241,.1); transform:translateX(3px); }
#auth-profile-dropdown .profile-dropdown-item.logout { margin-top:0.35rem; padding-top:0.45rem; border-top:1px solid rgba(148,163,184,.18); }
#auth-profile-dropdown .profile-dropdown-item.logout i { color:#ef4444; }
#auth-profile-dropdown .profile-dropdown-item.logout:hover { background:rgba(239,68,68,.1); }
html[data-theme="dark"] #auth-profile-dropdown { border-color:rgba(148,163,184,.16) !important; box-shadow:0 22px 48px rgba(0,0,0,.5) !important; }

#notification-dropdown {
    border-radius:16px !important; overflow:hidden;
    border:1px solid rgba(148,163,184,.18) !important;
    box-shadow:0 22px 48px rgba(15,23,42,.2), 0 4px 12px rgba(15,23,42,.08) !important;
    animation:cnav-menu-pop .16s ease;
}
html[data-theme="dark"] #notification-dropdown { border-color:rgba(148,163,184,.16) !important; box-shadow:0 22px 48px rgba(0,0,0,.5) !important; }

/* ══ Professional footer ══ */
.footer {
    position:relative;
    background:var(--bg-section-alt, #f8fafc);
    border-top:1px solid var(--border-color, #e2e8f0);
    padding:3.25rem 2rem 1.5rem;
}
.footer::before {
    content:""; position:absolute; top:0; left:0; right:0; height:3px;
    background:linear-gradient(90deg,#f97316,#a855f7,#6366f1,#22c55e,#f97316);
    background-size:200% 100%; animation:footer-border-flow 6s linear infinite;
}
@keyframes footer-border-flow { 0%{background-position:0% 0} 100%{background-position:200% 0} }

/* 🎮 Gamified quest banner */
.footer-quest {
    position:relative; overflow:hidden; max-width:1200px; margin:0 auto 2.5rem;
    display:flex; align-items:center; gap:1.1rem; flex-wrap:wrap;
    padding:1.05rem 1.4rem; border-radius:18px; color:#fff;
    background:linear-gradient(120deg,#4f46e5 0%,#7c3aed 48%,#db2777 100%);
    background-size:180% 180%; animation:cnav-hero-shift 9s ease infinite;
    box-shadow:0 12px 34px rgba(124,58,237,.32);
}
.footer-quest-glow {
    position:absolute; top:0; left:-40%; width:34%; height:100%; pointer-events:none;
    background:linear-gradient(100deg, transparent, rgba(255,255,255,.32), transparent);
    transform:skewX(-20deg); animation:cnav-sweep 5s ease-in-out infinite;
}
.footer-quest-main { display:flex; align-items:center; gap:0.85rem; flex:1 1 260px; min-width:0; }
.footer-quest-icon {
    width:46px; height:46px; flex-shrink:0; border-radius:13px; font-size:1.25rem;
    display:inline-flex; align-items:center; justify-content:center;
    background:rgba(255,255,255,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.28), 0 0 18px rgba(255,255,255,.25);
    animation:cnav-bolt 2.4s ease-in-out infinite;
}
.footer-quest-title { font-size:1.02rem; font-weight:800; line-height:1.2; text-shadow:0 1px 6px rgba(0,0,0,.18); }
.footer-quest-sub { font-size:0.82rem; opacity:.9; margin-top:0.1rem; }
.footer-quest-chips { display:flex; gap:0.5rem; flex-wrap:wrap; }
.fq-badge {
    display:inline-flex; align-items:center; gap:0.4rem; text-decoration:none;
    font-size:0.78rem; font-weight:800; color:#fff;
    padding:0.4rem 0.7rem; border-radius:999px;
    background:rgba(0,0,0,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
    transition:transform .16s, box-shadow .16s, background .16s;
}
.fq-badge i { color:var(--fqb,#fde68a); }
.fq-badge:hover {
    transform:translateY(-2px); color:#fff;
    background:rgba(0,0,0,.28); box-shadow:inset 0 0 0 1px rgba(255,255,255,.3), 0 0 14px color-mix(in srgb, var(--fqb,#fde68a) 55%, transparent);
}
.footer-quest-btn {
    display:inline-flex; align-items:center; gap:0.5rem; flex-shrink:0; text-decoration:none;
    font-size:0.9rem; font-weight:800; color:#4c1d95;
    padding:0.6rem 1.15rem; border-radius:12px; background:#fff;
    box-shadow:0 6px 18px rgba(0,0,0,.2); transition:transform .16s, box-shadow .16s, filter .16s;
}
.footer-quest-btn:hover { transform:translateY(-2px) scale(1.03); color:#4c1d95; box-shadow:0 10px 26px rgba(0,0,0,.28); }
.footer-quest-btn i { color:#7c3aed; }

/* Extra glow on gamified hovers */
.footer-quicklinks a:hover .fq-ico { box-shadow:0 0 12px color-mix(in srgb, var(--fq,#6366f1) 55%, transparent); }

@media (prefers-reduced-motion: reduce) {
    .footer::before, .footer-quest, .footer-quest-glow, .footer-quest-icon { animation:none !important; }
}
.footer-container { max-width:1200px; margin:0 auto 2.25rem; display:flex; justify-content:space-between; gap:3rem; flex-wrap:wrap; }
.footer-brand { max-width:370px; }
.footer-brand .logo { margin-bottom:0.9rem; }
.footer-tagline { font-size:1rem !important; color:var(--text-main,#0f172a) !important; margin-bottom:0.75rem; line-height:1.5; }
.footer-tagline strong { font-weight:800; }
.footer-desc { font-size:0.88rem !important; line-height:1.75; color:var(--text-gray,#64748b) !important; }
.footer-social { display:flex; gap:0.55rem; margin-top:1.15rem; }
.footer-social a {
    width:38px; height:38px; border-radius:11px; display:inline-flex; align-items:center; justify-content:center;
    background:rgba(148,163,184,.12); color:var(--text-gray,#64748b); font-size:0.95rem; text-decoration:none;
    transition:transform .16s, background .16s, color .16s, box-shadow .16s;
}
.footer-social a:hover {
    transform:translateY(-3px); color:#fff;
    background:linear-gradient(135deg,#6366f1,#a855f7);
    box-shadow:0 6px 16px rgba(99,102,241,.35);
}
.footer-links { display:flex; gap:2.75rem; flex-wrap:wrap; }

/* Beautified Quick Links — colored icon chips in soft cards */
.footer-quicklinks { display:flex; flex-direction:column; gap:0.4rem; }
.footer-quicklinks a {
    display:flex; align-items:center; gap:0.6rem;
    font-size:0.86rem; font-weight:600; color:var(--text-gray,#64748b);
    padding:0.4rem 0.5rem; border-radius:10px; text-decoration:none;
    transition:background .16s, color .16s, transform .16s;
}
.footer-quicklinks a .fq-ico {
    width:28px; height:28px; flex-shrink:0; border-radius:8px;
    display:inline-flex; align-items:center; justify-content:center; font-size:0.8rem;
    color:var(--fq,#6366f1);
    background:color-mix(in srgb, var(--fq,#6366f1) 15%, transparent);
    transition:background .16s, color .16s, transform .16s;
}
.footer-quicklinks a:hover {
    background:color-mix(in srgb, var(--fq,#6366f1) 10%, transparent);
    color:var(--text-main,#0f172a); transform:translateX(3px);
}
.footer-quicklinks a:hover .fq-ico {
    background:var(--fq,#6366f1); color:#fff; transform:rotate(-6deg) scale(1.08);
}
html[data-theme="dark"] .footer-quicklinks a:hover { color:#f1f5f9; }
.footer-column h4 {
    font-size:0.76rem !important; font-weight:800 !important; text-transform:uppercase; letter-spacing:.09em;
    color:var(--text-faint,#94a3b8) !important; margin-bottom:1rem !important; position:relative; padding-bottom:0.5rem;
}
.footer-column h4::after {
    content:""; position:absolute; left:0; bottom:0; width:22px; height:2px; border-radius:2px;
    background:linear-gradient(90deg,#f97316,#a855f7);
}
.footer-column a {
    display:flex; align-items:center; font-size:0.88rem; color:var(--text-gray,#64748b);
    margin-bottom:0.6rem; text-decoration:none; transition:color .15s, transform .15s;
}
.footer-column a::before {
    content:"\203A"; font-weight:700; font-size:0.9rem; color:#a855f7;
    opacity:0; width:0; margin-right:0; overflow:hidden;
    transition:opacity .15s, width .15s, margin-right .15s;
}
.footer-column a:hover { color:var(--nma-indigo,#6366f1); transform:translateX(2px); }
.footer-column a:hover::before { opacity:1; width:0.7rem; margin-right:0.35rem; }
.footer-bottom {
    max-width:1200px; margin:0 auto; padding-top:1.5rem; border-top:1px solid var(--border-color,#e2e8f0);
    display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem;
}
.footer-bottom p { font-size:0.82rem; color:var(--text-faint,#94a3b8); margin:0; }
.footer-legal { display:flex; gap:1.5rem; }
.footer-legal a { font-size:0.82rem; color:var(--text-gray,#64748b); text-decoration:none; transition:color .15s; }
.footer-legal a:hover { color:var(--nma-indigo,#6366f1); }
html[data-theme="dark"] .footer { background:var(--bg-section-alt,#0f172a); }
html[data-theme="dark"] .footer-social a { background:rgba(148,163,184,.14); color:#cbd5e1; }

@media (max-width:991px) {
    .cnav-mega-dropdown { display:none !important; }
}
.cnav-mega-mobile-cat { display:flex !important; align-items:center; gap:0.5rem; }
.cnav-mega-mobile-cat i:first-child { color:#6366f1; width:16px; text-align:center; }
.cnav-mega-mobile-count {
    margin-left:auto; font-size:10px; font-weight:800; color:#94a3b8;
    background:rgba(148,163,184,.14); padding:1px 7px; border-radius:99px;
}

/* ── Responsive ── */
@media (max-width:991px) {
    .cnav-arena-label { display:none; }
    .cnav-arena { padding:0.3rem 0.4rem !important; }
}
@media (min-width:992px) and (max-width:1199px) {
    .cnav-icon-text { font-size:0.76rem; padding:0.35rem 0.5rem !important; }
    .cnav-icon, .cnav-more { padding:0.25rem 0.5rem 0.25rem 0.4rem !important; }
    .cnav-icon i, .cnav-more i { font-size:0.75rem; }
    .cnav-icon .cnav-label, .cnav-more .cnav-label { font-size:0.72rem; }
    .cnav-arena-label { font-size:0.72rem; }
}

/* ══════════════════════════════════════════════════════════════
   2026 GLOBAL REDESIGN — production-ready, 1200px content width,
   correct light/dark visibility for all labels and backgrounds.
══════════════════════════════════════════════════════════════ */

/* ── Enhanced design tokens ── */
:root {
    --bg-body:         #f0f4ff;
    --bg-card:         #ffffff;
    --bg-gray:         #f1f5f9;
    --bg-section-alt:  #f8fafc;
    --text-main:       #0f172a;
    --text-gray:       #64748b;
    --text-faint:      #94a3b8;
    --border-color:    #e2e8f0;
    --nma-indigo:      #6366f1;
    --nma-indigo-soft: rgba(99,102,241,.1);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
    --shadow-md:  0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg:  0 10px 32px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.04);
}
html[data-theme="dark"] {
    --bg-body:         #0b0f1a;
    --bg-card:         #141c2e;
    --bg-gray:         #1a2236;
    --bg-section-alt:  #0f172a;
    --text-main:       #f1f5f9;
    --text-gray:       #94a3b8;
    --text-faint:      #64748b;
    --border-color:    rgba(255,255,255,.07);
    --nma-indigo:      #818cf8;
    --nma-indigo-soft: rgba(129,140,248,.14);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.4),  0 2px 8px rgba(0,0,0,.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,.45), 0 1px 4px rgba(0,0,0,.3);
    --shadow-lg:  0 10px 32px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
}

/* Body */
body { background: var(--bg-body); transition: background .3s, color .3s; }

/* ── THEME TOGGLE — always legible in both modes ── */
#theme-toggle {
    width: 36px !important; height: 36px !important; padding: 0 !important;
    border-radius: 10px !important; display: inline-flex !important;
    align-items: center !important; justify-content: center !important;
    background: var(--bg-gray) !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-main) !important; transition: all .2s !important;
}
#theme-toggle:hover {
    background: rgba(99,102,241,.12) !important;
    border-color: #6366f1 !important; color: #6366f1 !important;
}
html[data-theme="dark"] #theme-toggle {
    background: rgba(255,255,255,.07) !important;
    border-color: rgba(255,255,255,.12) !important; color: #f1f5f9 !important;
}
html[data-theme="dark"] #theme-toggle:hover {
    background: rgba(129,140,248,.18) !important;
    border-color: #818cf8 !important; color: #818cf8 !important;
}

/* ── Scrollbar ── */
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #0b0f1a; }

/* ══════════════════════════════════════════════════════════════
   PLAYGROUND — light mode (inline section-style handles dark)
══════════════════════════════════════════════════════════════ */
html[data-theme="dark"] .code-playground-section {
    background: linear-gradient(180deg, #0b0f1a 0%, #0f172a 100%) !important;
}
html[data-theme="dark"] .code-playground-section .cp-search {
    background: rgba(20,28,46,.85) !important; border-radius: 999px !important;
    border-color: rgba(129,140,248,.22) !important;
}
html[data-theme="dark"] .code-playground-section .cp-search i { color: #818cf8 !important; }
html[data-theme="dark"] .code-playground-section .cp-search input { color: #f1f5f9 !important; }
html[data-theme="dark"] .code-playground-section .cp-search input::placeholder { color: #475569 !important; }
html[data-theme="dark"] .code-playground-section .cp-tab {
    background: rgba(20,28,46,.8) !important; border-color: rgba(255,255,255,.07) !important;
    color: #64748b !important; border-radius: 999px !important;
}
html[data-theme="dark"] .code-playground-section .cp-tab:hover {
    color: #818cf8 !important; border-color: rgba(129,140,248,.3) !important;
    background: rgba(129,140,248,.08) !important;
}
html[data-theme="dark"] .code-playground-section .cp-tab.active {
    background: rgba(99,102,241,.22) !important; border-color: rgba(129,140,248,.45) !important;
    color: #a5b4fc !important; box-shadow: 0 4px 16px rgba(99,102,241,.2) !important;
}
html[data-theme="dark"] .code-playground-section .cp-card {
    background: rgba(20,28,46,.85) !important; border-color: rgba(255,255,255,.06) !important;
    color: #e2e8f0 !important; border-radius: 14px !important;
}
html[data-theme="dark"] .code-playground-section .cp-card:hover {
    border-color: rgba(129,140,248,.4) !important; background: rgba(30,40,65,.9) !important;
    box-shadow: 0 6px 24px rgba(99,102,241,.2) !important; transform: translateY(-3px) !important;
}
html[data-theme="dark"] .code-playground-section .cp-card span { color: #e2e8f0 !important; }
html[data-theme="dark"] .code-playground-section .cp-no-icon {
    background: rgba(30,41,59,.8) !important; color: #818cf8 !important;
}

/* ══════════════════════════════════════════════════════════════
   COURSES SECTION — full-width bg, 1200px inner content
══════════════════════════════════════════════════════════════ */
.courses-section {
    width: 100% !important; max-width: none !important; margin: 0 !important;
    padding: 4rem 1.5rem !important;
    background: #ffffff !important;
    border-top: 1px solid var(--border-color);
}
html[data-theme="dark"] .courses-section {
    background: #0b0f1a !important;
    border-top-color: rgba(255,255,255,.06) !important;
}
/* Center inner content */
.courses-section .section-header,
.courses-section .section-subtitle,
.courses-section .course-tabs,
.courses-section .courses-grid-container,
.courses-section .load-more-container {
    max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important;
}

/* Course category tabs */
.course-tab {
    padding: .4rem 1.1rem !important; border-radius: 999px !important;
    font-size: .82rem !important; font-weight: 600 !important;
    border: 1.5px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    color: var(--text-gray) !important;
    cursor: pointer; transition: all .18s !important; white-space: nowrap;
}
.course-tab:hover {
    border-color: rgba(99,102,241,.3) !important;
    color: #6366f1 !important; background: rgba(99,102,241,.05) !important;
}
.course-tab.active {
    background: #6366f1 !important; border-color: #6366f1 !important;
    color: #fff !important; box-shadow: 0 3px 12px rgba(99,102,241,.28) !important;
}
html[data-theme="dark"] .course-tab.active {
    background: rgba(99,102,241,.28) !important; border-color: rgba(129,140,248,.5) !important;
    color: #a5b4fc !important;
}

/* Course cards — light mode */
.course-card {
    background: #fff !important; border: 1px solid #e5e7eb !important;
    border-radius: 1.25rem !important; overflow: hidden !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.04) !important; transition: all .25s !important;
}
.course-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 14px 40px rgba(0,0,0,.1) !important; border-color: #c7d2fe !important;
}
/* Course card text — light mode: dark labels */
.course-title    { color: #0f172a !important; font-weight: 700 !important; }
.course-description { color: #64748b !important; }
.course-author   { color: #64748b !important; }
.course-meta     { color: #94a3b8 !important; }
.course-category { color: #64748b !important; }
.course-rating   { color: #f59e0b !important; font-weight: 700 !important; }
.course-price    { color: #0f172a !important; font-weight: 800 !important; }
.course-price.free { color: #16a34a !important; }
/* Course card text — dark mode: light labels */
html[data-theme="dark"] .course-card {
    background: #141c2e !important; border-color: rgba(255,255,255,.07) !important;
}
html[data-theme="dark"] .course-card:hover {
    border-color: rgba(129,140,248,.3) !important;
    box-shadow: 0 14px 40px rgba(0,0,0,.45) !important;
}
html[data-theme="dark"] .course-title       { color: #f1f5f9 !important; }
html[data-theme="dark"] .course-description { color: #94a3b8 !important; }
html[data-theme="dark"] .course-author      { color: #94a3b8 !important; }
html[data-theme="dark"] .course-meta        { color: #64748b !important; }
html[data-theme="dark"] .course-category    { color: #94a3b8 !important; }
html[data-theme="dark"] .course-price       { color: #f1f5f9 !important; }
html[data-theme="dark"] .course-price.free  { color: #4ade80 !important; }

/* Sections section-title and subtitle inside courses */
.courses-section .section-title  { color: #0f172a !important; }
.courses-section .section-subtitle { color: #64748b !important; }
html[data-theme="dark"] .courses-section .section-title  { color: #f1f5f9 !important; }
html[data-theme="dark"] .courses-section .section-subtitle { color: #94a3b8 !important; }

/* Load More button */
.load-more-container .btn-secondary {
    background: linear-gradient(135deg,#6366f1,#8b5cf6) !important;
    color: #fff !important; border: none !important; border-radius: 999px !important;
    padding: .65rem 1.75rem !important; font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(99,102,241,.3) !important; transition: all .2s !important;
}
.load-more-container .btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(99,102,241,.45) !important;
}

/* ══════════════════════════════════════════════════════════════
   PERFORMERS SECTION — full-width bg, 1200px via .performers-container
══════════════════════════════════════════════════════════════ */
.performers-section {
    width: 100% !important; max-width: none !important; margin: 0 !important;
    padding: 4rem 1.5rem !important;
    background: #f8fafc !important;
}
html[data-theme="dark"] .performers-section {
    background: #0f172a !important;
}
/* Inner 1200px container */
.performers-container {
    max-width: 1200px !important; margin: 0 auto !important;
}

/* Panels — light mode: white cards, dark labels */
.leaderboard-panel, .badges-panel {
    background: #ffffff !important; border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important; padding: 1.5rem !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.05) !important;
}
/* Panels — dark mode: dark cards, light labels */
html[data-theme="dark"] .leaderboard-panel,
html[data-theme="dark"] .badges-panel {
    background: #141c2e !important; border-color: rgba(255,255,255,.07) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.4) !important;
}

/* Panel headings */
.leaderboard-panel h3, .badges-panel h3 { color: #0f172a !important; font-size: 1.05rem; font-weight: 800; }
html[data-theme="dark"] .leaderboard-panel h3,
html[data-theme="dark"] .badges-panel h3 { color: #f1f5f9 !important; }

/* Leaderboard row labels — light: dark text */
.leaderboard-item  { border-color: #f1f5f9 !important; }
.rank-number, .rank-badge-num, .leaderboard-rank { color: #94a3b8 !important; font-weight: 800; font-size: .8rem; }
.user-name, .leaderboard-name, .user-display-name { color: #0f172a !important; font-weight: 600 !important; }
.user-title, .leaderboard-title, .user-role        { color: #94a3b8 !important; font-size: .72rem !important; }
.user-xp-score, .leaderboard-xp, .xp-score        { color: #6366f1 !important; font-weight: 800 !important; }
.change-badge.up   { color: #16a34a !important; }
.change-badge.down { color: #ef4444 !important; }
/* Leaderboard row labels — dark: light text */
html[data-theme="dark"] .leaderboard-item { border-color: rgba(255,255,255,.05) !important; }
html[data-theme="dark"] .user-name,
html[data-theme="dark"] .leaderboard-name,
html[data-theme="dark"] .user-display-name { color: #f1f5f9 !important; }
html[data-theme="dark"] .user-title,
html[data-theme="dark"] .leaderboard-title,
html[data-theme="dark"] .user-role { color: #64748b !important; }
html[data-theme="dark"] .user-xp-score,
html[data-theme="dark"] .leaderboard-xp,
html[data-theme="dark"] .xp-score { color: #818cf8 !important; }

/* Badges panel labels */
.badge-preview-name, .badge-label { color: #64748b !important; font-size: .7rem; font-weight: 700; }
html[data-theme="dark"] .badge-preview-name,
html[data-theme="dark"] .badge-label { color: #94a3b8 !important; }

/* Leaderboard subtitle */
.leaderboard-subtitle { color: #94a3b8 !important; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
/* View-full link */
.view-full  { color: #6366f1 !important; font-size: .78rem; font-weight: 700; }
html[data-theme="dark"] .view-full { color: #818cf8 !important; }

/* ══════════════════════════════════════════════════════════════
   FORUMS SECTION — full-width bg, 1200px via .forums-container
   Light mode = white/light card. Dark mode = dark card.
   Text ALWAYS contrasts its immediate background.
══════════════════════════════════════════════════════════════ */
.forums-section {
    width: 100% !important; max-width: none !important; margin: 0 !important;
    padding: 4rem 1.5rem !important;
    background: #f0f4ff !important;     /* LIGHT mode: pale indigo bg */
    position: relative;
}
html[data-theme="dark"] .forums-section {
    background: #0b0f1a !important;    /* DARK mode: near-black */
}

/* Inner container — the actual card */
.forums-container {
    max-width: 1200px !important; margin: 0 auto !important;
    background: #ffffff !important;          /* light: white card */
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    padding: 2rem !important;
    box-shadow: 0 4px 24px rgba(99,102,241,.07) !important;
    position: relative; z-index: 1;
}
html[data-theme="dark"] .forums-container {
    background: #141c2e !important;           /* dark: slate card */
    border-color: rgba(255,255,255,.07) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.4) !important;
}

/* Forums heading — light: dark. Dark: light. */
.forums-header h2 { color: #0f172a !important; font-size: clamp(1.3rem,3vw,1.8rem); font-weight: 800; }
.forums-header h2 i { color: #6366f1 !important; }
.forums-header p { color: #64748b !important; }
html[data-theme="dark"] .forums-header h2 { color: #f1f5f9 !important; }
html[data-theme="dark"] .forums-header h2 i { color: #818cf8 !important; }
html[data-theme="dark"] .forums-header p { color: #94a3b8 !important; }

/* Feature icons — same on both modes (colored glass) */
.feature-icon { border-radius: 12px !important; }
.feature-icon.purple { background: rgba(139,92,246,.12) !important; color: #7c3aed !important; }
.feature-icon.orange { background: rgba(249,115,22,.12) !important; color: #ea580c !important; }
.feature-icon.blue   { background: rgba(59,130,246,.12) !important; color: #2563eb !important; }
.feature-icon.green  { background: rgba(16,185,129,.12) !important; color: #059669 !important; }
html[data-theme="dark"] .feature-icon.purple { background: rgba(139,92,246,.22) !important; color: #c4b5fd !important; }
html[data-theme="dark"] .feature-icon.orange { background: rgba(249,115,22,.18) !important; color: #fdba74 !important; }
html[data-theme="dark"] .feature-icon.blue   { background: rgba(59,130,246,.18) !important; color: #93c5fd !important; }
html[data-theme="dark"] .feature-icon.green  { background: rgba(16,185,129,.18) !important; color: #6ee7b7 !important; }

/* Feature text — light: dark. Dark: light. */
.feature-text h4 { color: #0f172a !important; font-size: .88rem !important; font-weight: 700 !important; }
.feature-text p  { color: #64748b !important; font-size: .78rem !important; }
html[data-theme="dark"] .feature-text h4 { color: #f1f5f9 !important; }
html[data-theme="dark"] .feature-text p  { color: #94a3b8 !important; }

/* Recent discussions area */
.recent-discussions {
    background: #f8fafc !important; border: 1px solid #e2e8f0 !important;
    border-radius: 1.25rem !important; padding: 1.25rem !important; margin-top: 1.5rem;
}
html[data-theme="dark"] .recent-discussions {
    background: rgba(255,255,255,.04) !important;
    border-color: rgba(255,255,255,.07) !important;
}
.discussions-header h3 { color: #0f172a !important; }
html[data-theme="dark"] .discussions-header h3 { color: #f1f5f9 !important; }

/* Discussion items — light: dark text. Dark: light text. */
.discussion-title, .discussion-item h4, .discussion-item .title {
    color: #0f172a !important; font-size: .88rem !important; font-weight: 600 !important;
}
.discussion-meta, .discussion-stats, .discussion-item .meta {
    color: #94a3b8 !important; font-size: .75rem !important;
}
html[data-theme="dark"] .discussion-title,
html[data-theme="dark"] .discussion-item h4,
html[data-theme="dark"] .discussion-item .title { color: #e2e8f0 !important; }
html[data-theme="dark"] .discussion-meta,
html[data-theme="dark"] .discussion-stats,
html[data-theme="dark"] .discussion-item .meta { color: rgba(255,255,255,.38) !important; }

.discussion-tag { border-radius: 999px !important; font-weight: 700 !important; font-size: .67rem !important; }
.view-all-forums { color: #6366f1 !important; font-weight: 700 !important; font-size: .84rem !important; display: block; text-align: center; margin-top: 1rem; }
html[data-theme="dark"] .view-all-forums { color: #818cf8 !important; }
.view-all-forums:hover { color: #4f46e5 !important; }
html[data-theme="dark"] .view-all-forums:hover { color: #a5b4fc !important; }

/* New post button */
.btn.btn-small {
    background: rgba(99,102,241,.1) !important; color: #6366f1 !important;
    border: 1px solid rgba(99,102,241,.2) !important; border-radius: 999px !important;
    font-size: .78rem !important; font-weight: 700 !important;
}
.btn.btn-small:hover {
    background: rgba(99,102,241,.18) !important; color: #4f46e5 !important;
}
html[data-theme="dark"] .btn.btn-small {
    background: rgba(129,140,248,.15) !important; color: #a5b4fc !important;
    border-color: rgba(129,140,248,.3) !important;
}

/* ══════════════════════════════════════════════════════════════
   BADGE COLLECTION — full-width bg, 1200px inner content
   Light mode = pale indigo. Dark mode = dark navy.
══════════════════════════════════════════════════════════════ */
.badge-collection-section {
    width: 100% !important; max-width: none !important; margin: 0 !important;
    padding: 4rem 1.5rem !important;
    background: #f0f4ff !important;            /* light: pale indigo */
}
html[data-theme="dark"] .badge-collection-section {
    background: #0b0f1a !important;            /* dark: near-black */
}
/* Center inner content */
.badge-collection-section .section-title,
.badge-collection-section .badge-grid,
.badge-collection-section .unlock-progress {
    max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important;
}

/* Section title — light: dark. Dark: light. */
.badge-collection-section .section-title { color: #0f172a !important; }
.badge-collection-section .section-title i { color: #f59e0b !important; }
html[data-theme="dark"] .badge-collection-section .section-title { color: #f1f5f9 !important; }

/* Badge grid cards — light: white. Dark: slate. */
.badge-item {
    background: #ffffff !important; border: 1px solid #e2e8f0 !important;
    border-radius: 1.25rem !important; padding: 1.25rem 1rem !important;
    text-align: center !important; transition: all .25s !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.badge-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 28px rgba(99,102,241,.12) !important;
    border-color: #c7d2fe !important;
}
.badge-item.unlocked { border-top: 3px solid #f59e0b !important; }
.badge-item.unlocked:hover { box-shadow: 0 8px 28px rgba(245,158,11,.18) !important; }

/* Badge card text — light: dark labels */
.badge-item-name, .badge-name {
    color: #0f172a !important; font-size: .78rem !important; font-weight: 700 !important;
}
.badge-item-desc, .badge-description {
    color: #64748b !important; font-size: .68rem !important;
}
.badge-item.locked .badge-item-icon,
.badge-item.locked .badge-icon { opacity: .38; filter: grayscale(1); }
.badge-item.locked .badge-item-name,
.badge-item.locked .badge-name { color: #94a3b8 !important; }

/* Badge card — dark mode: dark cards, light labels */
html[data-theme="dark"] .badge-item {
    background: #141c2e !important; border-color: rgba(255,255,255,.07) !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .badge-item:hover {
    background: #1a2236 !important; border-color: rgba(129,140,248,.28) !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.35) !important;
}
html[data-theme="dark"] .badge-item.unlocked { border-top-color: #f59e0b !important; }
html[data-theme="dark"] .badge-item-name,
html[data-theme="dark"] .badge-name { color: #f1f5f9 !important; }
html[data-theme="dark"] .badge-item-desc,
html[data-theme="dark"] .badge-description { color: #94a3b8 !important; }
html[data-theme="dark"] .badge-item.locked .badge-item-name,
html[data-theme="dark"] .badge-item.locked .badge-name { color: #475569 !important; }

/* Progress bar inside badge items */
.badge-progress, .badge-item-progress {
    height: 4px; background: #e2e8f0 !important;
    border-radius: 999px; overflow: hidden; margin-top: .5rem;
}
.badge-progress-fill, .badge-item-progress-fill {
    height: 100%; border-radius: inherit;
    background: linear-gradient(90deg,#6366f1,#8b5cf6) !important;
}
html[data-theme="dark"] .badge-progress,
html[data-theme="dark"] .badge-item-progress {
    background: rgba(255,255,255,.08) !important;
}

/* Unlock progress bar */
.unlock-progress {
    background: #ffffff !important; border: 1px solid #e2e8f0 !important;
    border-radius: 1.25rem !important; padding: 1.25rem 1.5rem !important;
    margin-top: 1.5rem !important;
}
.unlock-progress p, .unlock-progress-text { color: #64748b !important; font-size: .84rem !important; }
html[data-theme="dark"] .unlock-progress {
    background: rgba(255,255,255,.04) !important; border-color: rgba(255,255,255,.07) !important;
}
html[data-theme="dark"] .unlock-progress p,
html[data-theme="dark"] .unlock-progress-text { color: rgba(255,255,255,.55) !important; }

/* ══════════════════════════════════════════════════════════════
   STATS, PROGRESS, CHALLENGES — full-width, themed backgrounds
══════════════════════════════════════════════════════════════ */
.stats-section {
    background: #ffffff !important;
    max-width: none !important; margin: 0 !important;
    padding: 3.5rem 1.5rem !important;
}
html[data-theme="dark"] .stats-section { background: #0f172a !important; }

.progress-section {
    background: #f8fafc !important;
    max-width: none !important; margin: 0 !important;
    padding: 3rem 1.5rem !important;
}
html[data-theme="dark"] .progress-section { background: #0b0f1a !important; }

.challenges-section {
    background: #f0f4ff !important;
    max-width: none !important; margin: 0 !important;
    padding: 3rem 1.5rem !important;
}
html[data-theme="dark"] .challenges-section { background: #0f172a !important; }

/* ── Section titles — always contrast the section background ── */
.section-title { color: var(--text-main) !important; }
html[data-theme="dark"] .section-title { color: #f1f5f9 !important; }
.section-subtitle { color: var(--text-gray) !important; }

/* ── JS-rendered card text — light: dark. Dark: light. ── */
/* These classes come from script.js and styles.css */
.user-card-name, .user-info-name { color: #0f172a !important; }
.user-card-role, .user-info-role { color: #64748b !important; }
.user-stat-value                 { color: #0f172a !important; font-weight: 700 !important; }
.user-stat-label                 { color: #94a3b8 !important; font-size: .72rem !important; }
.streak-value                    { color: #f97316 !important; font-weight: 800 !important; }
.achievement-name                { color: #0f172a !important; font-weight: 600 !important; }
.achievement-desc                { color: #64748b !important; font-size: .78rem !important; }
.challenge-title                 { color: #0f172a !important; font-weight: 700 !important; }
.challenge-desc                  { color: #64748b !important; font-size: .82rem !important; }
html[data-theme="dark"] .user-card-name,
html[data-theme="dark"] .user-info-name { color: #f1f5f9 !important; }
html[data-theme="dark"] .user-card-role,
html[data-theme="dark"] .user-info-role { color: #94a3b8 !important; }
html[data-theme="dark"] .user-stat-value  { color: #f1f5f9 !important; }
html[data-theme="dark"] .user-stat-label  { color: #64748b !important; }
html[data-theme="dark"] .achievement-name { color: #f1f5f9 !important; }
html[data-theme="dark"] .achievement-desc { color: #94a3b8 !important; }
html[data-theme="dark"] .challenge-title  { color: #f1f5f9 !important; }
html[data-theme="dark"] .challenge-desc   { color: #94a3b8 !important; }

/* ══════════════════════════════════════════════════════════════
   GLOBAL INPUTS / DROPDOWNS — always readable
══════════════════════════════════════════════════════════════ */
.form-control, .form-select,
input[type="text"], input[type="email"],
input[type="password"], input[type="search"], textarea {
    color: var(--text-main);
    background: var(--bg-card);
    border-color: var(--border-color);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
.form-control:focus, input:focus { border-color: var(--nma-indigo); }

html[data-theme="dark"] .dropdown-menu {
    background: #1a2236 !important; border-color: rgba(255,255,255,.08) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,.5) !important;
}
html[data-theme="dark"] .dropdown-item { color: #f1f5f9 !important; }
html[data-theme="dark"] .dropdown-item:hover {
    background: rgba(129,140,248,.1) !important; color: #818cf8 !important;
}
html[data-theme="dark"] .dropdown-divider { border-color: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] #notification-dropdown {
    background: #1a2236 !important; border-color: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] #auth-profile-dropdown {
    background: #1a2236 !important; border-color: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] #auth-profile-dropdown .dropdown-item { color: #f1f5f9 !important; }
html[data-theme="dark"] #auth-profile-dropdown .dropdown-item:hover {
    background: rgba(129,140,248,.1) !important; color: #818cf8 !important;
}

/* Modal */
html[data-theme="dark"] .modal         { background: #1a2236 !important; border-color: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .modal-header  { border-bottom-color: rgba(255,255,255,.08) !important; }
html[data-theme="dark"] #modal-title   { color: #f1f5f9 !important; }
html[data-theme="dark"] .modal-close   { color: #94a3b8 !important; }
html[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.65) !important; }

/* Card global */
.card, .codemy-card {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

/* ══════════════════════════════════════════════════════════════
   CTA SECTION — always electric indigo gradient, white labels
══════════════════════════════════════════════════════════════ */
.cta-section {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 45%, #7c3aed 100%) !important;
    position: relative; overflow: hidden; max-width: none !important; margin: 0 !important;
}
.cta-section::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,255,255,.08) 0%, transparent 70%);
}
.cta-container { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; }
.cta-container h2 { color: #ffffff !important; font-weight: 900 !important; }
.cta-container p  { color: rgba(255,255,255,.78) !important; }
.btn-cta-primary {
    background: #ffffff !important; color: #4338ca !important;
    font-weight: 700 !important; border-radius: 999px !important;
    border: none !important; box-shadow: 0 4px 24px rgba(255,255,255,.2) !important;
}
.btn-cta-primary:hover {
    background: #f0f4ff !important; transform: translateY(-2px) !important;
    box-shadow: 0 8px 32px rgba(255,255,255,.3) !important; color: #3730a3 !important;
}
.btn-cta-secondary {
    background: rgba(255,255,255,.12) !important; color: #ffffff !important;
    border: 1.5px solid rgba(255,255,255,.3) !important; border-radius: 999px !important;
    font-weight: 600 !important;
}
.btn-cta-secondary:hover { background: rgba(255,255,255,.22) !important; }

/* ══════════════════════════════════════════════════════════════
   COMMUNITY FORUMS — modern redesign. Scoped to .forums-modern so
   the shared .discussion-item styles (home/courses) are untouched.
══════════════════════════════════════════════════════════════ */
.forums-modern { --fm-accent: #7c3aed; --fm-accent-2: #6366f1; --fm-cta: #f97316; }

/* Hero */
.forums-hero { padding: 2.75rem 1.5rem 1.25rem; text-align: center; }
.forums-hero-inner { max-width: 720px; margin: 0 auto; }
.forums-hero-icon {
    width: 62px; height: 62px; margin: 0 auto 1.1rem; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 1.65rem; color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    box-shadow: 0 12px 26px -10px rgba(124,58,237,.65);
}
.forums-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.15rem) !important; font-weight: 800 !important;
    margin: 0 0 .5rem !important; letter-spacing: -.02em; color: #0f172a !important;
}
.forums-hero p { color: #64748b !important; font-size: 1.02rem; margin: 0; line-height: 1.6; }
html[data-theme="dark"] .forums-hero h1 { color: #f1f5f9 !important; }
html[data-theme="dark"] .forums-hero p { color: #94a3b8 !important; }

/* Body + toolbar */
.forums-body { max-width: 920px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.forum-toolbar {
    display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
    background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 18px; padding: .85rem; margin-bottom: 1.35rem;
    box-shadow: 0 6px 22px -14px rgba(0,0,0,.25);
}
html[data-theme="dark"] .forum-toolbar { background: #1e293b; border-color: rgba(255,255,255,.08); }
.forum-toolbar-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; flex: 1 1 auto; min-width: 0; }
.forum-search { position: relative; flex: 1 1 240px; min-width: 0; }
.forum-search i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .9rem; pointer-events: none; }
.forum-search input {
    width: 100%; padding: .62rem .95rem .62rem 2.4rem; border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 999px; background: var(--bg-light, #f8fafc); color: var(--text-main, #0f172a);
    font-size: .9rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.forum-search input::placeholder { color: #94a3b8; }
.forum-search input:focus { outline: none; border-color: var(--fm-accent); box-shadow: 0 0 0 3px rgba(124,58,237,.14); background: var(--bg-card, #fff); }
.forum-select {
    padding: .58rem 2rem .58rem .95rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 999px;
    background: var(--bg-light, #f8fafc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .9rem center;
    color: var(--text-main, #0f172a); font-size: .88rem; cursor: pointer; appearance: none; -webkit-appearance: none; transition: border-color .2s;
}
.forum-select:focus { outline: none; border-color: var(--fm-accent); }
html[data-theme="dark"] .forum-search input, html[data-theme="dark"] .forum-select { background-color: rgba(255,255,255,.05); color: #e2e8f0; border-color: rgba(255,255,255,.1); }

.forum-btn {
    display: inline-flex; align-items: center; gap: .45rem; border: none; border-radius: 999px;
    padding: .62rem 1.15rem; font-size: .88rem; font-weight: 700; cursor: pointer; text-decoration: none;
    white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.forum-btn-apply { background: var(--bg-gray, #eef2f6); color: var(--text-main, #0f172a); border: 1px solid var(--border-color, #e2e8f0); }
.forum-btn-apply:hover { background: #e2e8f0; }
.forum-btn-ghost { background: transparent; color: #64748b; border: 1px solid var(--border-color, #e2e8f0); }
.forum-btn-ghost:hover { color: var(--text-main, #0f172a); border-color: #cbd5e1; }
.forum-btn-new { background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; box-shadow: 0 10px 22px -10px rgba(249,115,22,.75); }
.forum-btn-new:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(249,115,22,.9); color: #fff; }
html[data-theme="dark"] .forum-btn-apply { background: rgba(255,255,255,.06); color: #e2e8f0; border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .forum-btn-ghost { color: #94a3b8; border-color: rgba(255,255,255,.12); }

.forum-listhead { margin: 0 .35rem 1rem; font-size: .9rem; color: #64748b; }
.forum-listhead strong { color: var(--text-main, #0f172a); }
html[data-theme="dark"] .forum-listhead { color: #94a3b8; }
html[data-theme="dark"] .forum-listhead strong { color: #f1f5f9; }

/* Discussion cards */
.forums-modern .discussion-list { gap: .85rem; }
.forums-modern .discussion-item {
    align-items: center; background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px; padding: 1.1rem 1.35rem; box-shadow: 0 2px 12px -8px rgba(0,0,0,.15);
    transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease, background .2s ease;
}
.forums-modern .discussion-item:hover {
    transform: translateY(-2px); border-color: rgba(124,58,237,.4);
    box-shadow: 0 16px 32px -16px rgba(124,58,237,.4);
}
html[data-theme="dark"] .forums-modern .discussion-item { background: #1e293b; border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .forums-modern .discussion-item:hover { border-color: rgba(129,140,248,.5); box-shadow: 0 16px 34px -16px rgba(0,0,0,.7); }
.forums-modern .discussion-content h4 {
    font-size: 1.06rem !important; font-weight: 700 !important; color: #0f172a !important;
    margin-bottom: .55rem !important; padding-right: 2rem; transition: color .2s;
}
.forums-modern .discussion-item:hover .discussion-content h4 { color: var(--fm-accent) !important; }
html[data-theme="dark"] .forums-modern .discussion-content h4 { color: #f1f5f9 !important; }
.forums-modern .discussion-tags { margin-bottom: .65rem; }
.forums-modern .tag { padding: .28rem .72rem; font-size: .7rem; font-weight: 700; }
.forums-modern .discussion-author { font-size: .85rem !important; color: #64748b !important; }
.forums-modern .discussion-author img { width: 30px; height: 30px; border: 2px solid var(--bg-card, #fff); box-shadow: 0 0 0 1px var(--border-color, #e2e8f0); }
.forums-modern .discussion-author > span:first-of-type { font-weight: 600; color: var(--text-main, #0f172a); }
html[data-theme="dark"] .forums-modern .discussion-author > span:first-of-type { color: #e2e8f0; }

/* Stats pills */
.forums-modern .discussion-stats { gap: .4rem; margin-left: 1rem; align-self: center; }
.forums-modern .discussion-stats span {
    padding: .34rem .62rem; border-radius: 999px; background: var(--bg-light, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0); font-size: .8rem !important; font-weight: 600;
    color: #64748b !important; transition: background .2s, color .2s, border-color .2s;
}
html[data-theme="dark"] .forums-modern .discussion-stats span { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); color: #94a3b8 !important; }
.forums-modern .discussion-stats .forum-like-btn { cursor: pointer; }
.forums-modern .discussion-stats .forum-like-btn:hover,
.forums-modern .discussion-stats .forum-like-btn.liked {
    background: rgba(239,68,68,.09); border-color: rgba(239,68,68,.4); color: #ef4444 !important;
}
.forums-modern .discussion-stats .forum-like-btn.liked i { color: #ef4444 !important; }

/* Pagination */
.forum-pagination { display: flex; justify-content: center; gap: .45rem; margin-top: 2.25rem; flex-wrap: wrap; }
.forum-pagination a {
    min-width: 2.4rem; text-align: center; padding: .5rem .85rem; border-radius: 11px;
    border: 1px solid var(--border-color, #e2e8f0); background: var(--bg-card, #fff);
    color: var(--text-main, #0f172a); font-weight: 600; font-size: .85rem; text-decoration: none; transition: all .2s;
}
.forum-pagination a:hover { border-color: var(--fm-accent); color: var(--fm-accent); }
.forum-pagination a.active { background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff; border-color: transparent; }
html[data-theme="dark"] .forum-pagination a { background: #1e293b; border-color: rgba(255,255,255,.1); color: #e2e8f0; }

@media (max-width: 640px) {
    .forum-toolbar { padding: .7rem; }
    .forum-toolbar-form { width: 100%; }
    .forum-btn-new { width: 100%; justify-content: center; }
    .forums-modern .discussion-item { flex-direction: column; align-items: flex-start; }
    .forums-modern .discussion-stats { margin-left: 0; margin-top: .85rem; align-self: stretch; }
}
