/* ══════════════════════════════════════════════════════════════
   TokInteract — Premium Design System v7.0
   Ultra-Dark Glassmorphism | Modern Animations | Responsive
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
    /* Brand Palette — Indigo / Violet */
    --primary: #6366f1;
    --primary-rgb: 99, 102, 241;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-hover: #818cf8;

    --secondary: #8b5cf6;
    --secondary-rgb: 139, 92, 246;
    --secondary-gradient: linear-gradient(135deg, #8b5cf6, #c084fc);
    --secondary-glow: rgba(139, 92, 246, 0.35);
    --secondary-hover: #a78bfa;

    /* Accent Colors */
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-yellow: #eab308;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --danger: #ef4444;

    /* Background System — Ultra Deep */
    --bg-darkest: #06060b;
    --bg-dark: #0a0a12;
    --bg-mid: #0f0f1a;
    --bg-card: rgba(12, 12, 22, 0.55);
    --bg-glass: rgba(255, 255, 255, 0.02);
    --bg-light: rgba(255, 255, 255, 0.04);

    /* Text */
    --text-main: #f1f5f9;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #334155;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.025);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --glass-glow: 0 8px 32px -8px rgba(0, 0, 0, 0.5);
    --glass-highlight: rgba(255, 255, 255, 0.06);

    /* Navbar */
    --navbar-height: 52px;

    /* Radius */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-normal: 0.35s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);
}

/* ── RESETS ──────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-darkest);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── AMBIENT BACKGROUND ─────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 15%, rgba(var(--primary-rgb), 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 85% 80%, rgba(var(--secondary-rgb), 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
    z-index: -2;
    pointer-events: none;
    animation: ambientShift 30s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.025;
    z-index: -1;
    pointer-events: none;
}

@keyframes ambientShift {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-main);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ══════════════════════════════════════════════════════════════
   PREMIUM GLASS CARD
   ══════════════════════════════════════════════════════════════ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
    box-shadow: var(--glass-glow);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.5);
}

.glass-card:hover::before { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 28px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 16px var(--secondary-glow);
}
.btn-secondary:hover:not(:disabled) {
    box-shadow: 0 8px 28px var(--secondary-glow);
    transform: translateY(-1px);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    backdrop-filter: blur(8px);
}
.btn-glass:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-hover);
}

.btn-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent-green);
}
.btn-success:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
}

.btn-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--accent-amber);
}
.btn-warning:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; border-radius: var(--radius-xs); }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 0.95rem; }
.btn-icon { padding: 0.55rem; border-radius: var(--radius-sm); aspect-ratio: 1; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.form-control::placeholder { color: var(--text-dim); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.form-control option { background: var(--bg-mid); color: var(--text-main); }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── FORM SWITCH (Toggle) ───────────────────────────────────── */
.form-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.form-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.form-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    transition: all var(--transition-fast);
    border: 1px solid var(--glass-border);
}

.form-switch .slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #64748b;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.form-switch input:checked + .slider {
    background: var(--primary-gradient);
    border-color: transparent;
}

.form-switch input:checked + .slider::before {
    transform: translateX(22px);
    background: #fff;
}

/* ── RANGE SLIDER ───────────────────────────────────────────── */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ══════════════════════════════════════════════════════════════ */
.dashboard-layout {
    display: block;
    min-height: 100vh;
    padding-top: var(--navbar-height);
}

/* ══════════════════════════════════════════════════════════════
   TOP NAVBAR
   ══════════════════════════════════════════════════════════════ */
.top-navbar {
    width: 100%;
    height: var(--navbar-height);
    background: rgba(6, 6, 11, 0.92);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
}

/* Gradient top accent line */
.top-navbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(var(--primary-rgb), 0.4), rgba(var(--secondary-rgb), 0.3), transparent 90%);
}

.top-navbar-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important;
    max-width: 100% !important;
    padding: 0 1.25rem !important;
    position: relative !important;
}

.top-navbar-logo {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    min-width: 140px !important;
    z-index: 10 !important;
}

.top-navbar-logo img {
    height: 22px !important;
    width: auto !important;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.top-navbar-logo:hover img { opacity: 1; }

.top-navbar-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    margin: 0 0.75rem !important;
    min-width: 0 !important;
    overflow: hidden !important;
    gap: 0 !important;
}

.tn-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    padding: 0 0.7rem !important;
    height: 100% !important;
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    position: relative !important;
    transition: color 0.25s ease !important;
    border: none !important;
}

.tn-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 2px !important;
    background: var(--primary-gradient) !important;
    border-radius: 2px 2px 0 0 !important;
    transition: width 0.3s var(--ease-out) !important;
}

.tn-link:hover {
    color: rgba(255, 255, 255, 0.7) !important;
}
.tn-link:hover::after { width: 60% !important; }

.tn-link.active {
    color: rgba(255, 255, 255, 0.95) !important;
}
.tn-link.active::after { width: 80% !important; }

.tn-link i { font-size: 0.85rem !important; }
.tn-link span { font-size: 0.68rem !important; }

/* ── Navbar PWA Install Button ─────────────────────────────── */
.tn-link-install {
    color: var(--accent-pink) !important;
}

/* ── Hide text labels when tight ───────────────────────────── */
@media (max-width: 1550px) {
    .tn-link span { display: none !important; }
    .tn-link i { font-size: 1rem !important; }
    .tn-link { padding: 0 1rem !important; }
    .top-navbar-logo { min-width: 100px !important; }
    .top-navbar-right { min-width: 100px !important; }
}

/* ── Navbar Right ──────────────────────────────────────────── */
.top-navbar-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.6rem !important;
    flex: 0 0 auto !important;
    min-width: 150px !important;
    z-index: 10 !important;
}

.tn-user-badge {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.25rem 0.6rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 99px !important;
    transition: all 0.25s;
}

.tn-user-badge.is-online {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}
.tn-user-badge.is-online .tn-status-dot {
    background: var(--accent-green) !important;
    box-shadow: 0 0 8px var(--accent-green), 0 0 16px rgba(16, 185, 129, 0.4);
    animation: statusPulse 1.5s infinite;
}
.tn-user-badge.is-online .tn-status-text {
    color: var(--accent-green) !important;
}

.tn-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
    transition: all 0.3s;
}

.tn-status-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.tn-divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.06);
}

.tn-username {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.tn-logout-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px; height: 30px;
    border-radius: var(--radius-xs);
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    transition: all 0.25s;
}
.tn-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger) !important;
}

/* ── Hamburger ─────────────────────────────────────────────── */
.tn-hamburger {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    z-index: 100 !important;
}

/* ── Mobile Overlay ────────────────────────────────────────── */
.tn-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.tn-mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobile Nav ────────────────────────────────────────────── */
@media (max-width: 1300px) {
    .top-navbar-nav {
        position: fixed !important;
        top: var(--navbar-height) !important;
        left: 0 !important; right: 0 !important;
        background: rgba(6, 6, 11, 0.97) !important;
        backdrop-filter: blur(40px) !important;
        flex-direction: column !important;
        height: auto !important;
        max-height: calc(100vh - var(--navbar-height)) !important;
        overflow-y: auto !important;
        padding: 0.5rem !important;
        margin: 0 !important;
        z-index: 2001 !important;
        transform: translateY(-120%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: all 0.35s var(--ease-out) !important;
        justify-content: flex-start !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    }
    .top-navbar-nav.open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    .tn-link {
        height: auto !important;
        padding: 0.85rem 1.25rem !important;
        border: none !important;
        width: 100% !important;
        justify-content: flex-start !important;
        border-radius: var(--radius-sm) !important;
    }
    .tn-link::after { display: none !important; }
    .tn-link.active { background: rgba(var(--primary-rgb), 0.08) !important; }
    .tn-link span { display: block !important; font-size: 0.85rem !important; }
    .tn-hamburger { display: flex !important; }
    .top-navbar-right { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   CONTENT LAYOUT
   ══════════════════════════════════════════════════════════════ */
.top-bar { display: none; }
.top-bar-left { display: flex; align-items: center; gap: 1rem; }
.top-bar-right { display: flex; align-items: center; gap: 0.75rem; }

.page-title { font-size: 1.2rem; font-weight: 700; }
.page-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-top: 1px; }

.mobile-menu-btn {
    display: none;
    background: none; border: none;
    color: var(--text-main);
    font-size: 1.25rem; cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}
.mobile-menu-btn:hover { background: var(--glass-highlight); }

.page-content { padding: 2rem; flex: 1; }

/* ── CONNECTION STATUS BADGE ────────────────────────────────── */
.connection-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--accent-green);
    animation: statusPulse 2s ease infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    transition: transform var(--transition-normal);
}

.stat-card:hover { transform: translateY(-3px); }

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
}

.stat-delta {
    font-size: 0.7rem;
    color: var(--accent-green);
    margin-top: 3px;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   ACTIVITY FEED
   ══════════════════════════════════════════════════════════════ */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 350px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    animation: slideIn 0.3s ease forwards;
    border-left: 3px solid transparent;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── CHAT FEED ──────────────────────────────────────────────── */
.chat-feed { display: flex; flex-direction: column; gap: 0.5rem; max-height: 400px; overflow-y: auto; }
.chat-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem; border-radius: var(--radius-sm); transition: background var(--transition-fast); }
.chat-item:hover { background: var(--glass-highlight); }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-light); }
.chat-avatar-placeholder { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; }
.chat-body { flex: 1; min-width: 0; }
.chat-username { font-size: 0.78rem; font-weight: 700; color: var(--primary); }
.chat-message { font-size: 0.85rem; color: var(--text-secondary); margin-top: 1px; word-break: break-word; }

/* ── SECTION HEADER ─────────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.section-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }

/* ── MODULE GRID ────────────────────────────────────────────── */
.modules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

.module-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}
.module-card:hover { background: rgba(255, 255, 255, 0.04); transform: translateY(-2px); border-color: var(--glass-border-hover); }
.module-card-icon { font-size: 1.75rem; flex-shrink: 0; }
.module-card-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; }
.module-card-sub { font-size: 0.75rem; color: var(--text-muted); }
.module-card-status { margin-left: auto; font-size: 0.72rem; font-weight: 600; }

/* ── PROGRESS BAR ───────────────────────────────────────────── */
.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 99px;
    transition: width 1s var(--ease-out);
    position: relative;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── LEADERBOARD ────────────────────────────────────────────── */
.leaderboard-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem; border-radius: var(--radius-sm); transition: background var(--transition-fast); }
.leaderboard-item:hover { background: var(--glass-highlight); }

.lb-rank { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.78rem; flex-shrink: 0; }
.lb-rank.gold { background: rgba(234, 179, 8, 0.12); color: var(--accent-yellow); border: 1px solid rgba(234, 179, 8, 0.2); }
.lb-rank.silver { background: rgba(148, 163, 184, 0.12); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }
.lb-rank.bronze { background: rgba(180, 120, 60, 0.12); color: #b4783c; border: 1px solid rgba(180, 120, 60, 0.2); }
.lb-rank.other { background: var(--glass-bg); color: var(--text-muted); border: 1px solid var(--glass-border); }

.lb-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-light); }
.lb-user { flex: 1; min-width: 0; }
.lb-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-diamonds { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.lb-value { font-size: 0.88rem; font-weight: 700; color: var(--accent-yellow); }

/* ── ALERT BOX ──────────────────────────────────────────────── */
.alert-box {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-info { background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.15); color: #93c5fd; }
.alert-success { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.alert-warning { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.15); color: #fcd34d; }
.alert-danger { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.15); color: #fca5a5; }

/* ── OBS URL COPY BLOCK ─────────────────────────────────────── */
.obs-url-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
}
.obs-url-input { flex: 1; background: none; border: none; color: var(--text-secondary); font-size: 0.82rem; outline: none; min-width: 0; font-family: 'SF Mono', 'Cascadia Code', monospace; }

/* ── SOUND ALERT ITEMS ──────────────────────────────────────── */
.sound-alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.65rem;
    transition: all var(--transition-normal);
    gap: 1rem;
}
.sound-alert-item:hover { border-color: var(--glass-border-hover); transform: translateX(4px); }
.sound-alert-info { flex: 1; min-width: 0; }
.sound-alert-name { font-size: 0.88rem; font-weight: 600; margin-bottom: 3px; }
.sound-alert-trigger { font-size: 0.75rem; color: var(--text-muted); }
.sound-alert-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ── TABS ───────────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 3px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
}

.tab-btn {
    flex: 1;
    padding: 0.55rem 1rem;
    border-radius: calc(var(--radius-sm) - 2px);
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.04); }
.tab-btn.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-hover);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
    background: var(--bg-mid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    transform: translateY(16px) scale(0.97);
    transition: transform var(--transition-normal);
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.15rem; padding: 0.25rem; border-radius: var(--radius-xs); transition: color var(--transition-fast); }
.modal-close:hover { color: var(--text-main); }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.65rem; margin-top: 1.5rem; }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════ */
.text-primary { color: var(--primary); }
.text-secondary-color { color: var(--secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-green); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--accent-yellow); }
.text-gradient { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.72rem; }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.1rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; }
.w-full { width: 100%; } .h-full { height: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; }
.p-0 { padding: 0 !important; }

.hidden { display: none !important; }
.visible { display: block !important; }
.overflow-hidden { overflow: hidden; }
.rounded { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }

.divider { height: 1px; background: var(--glass-border); margin: 1.25rem 0; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-primary { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); border: 1px solid rgba(var(--primary-rgb), 0.2); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--accent-yellow); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in-up { animation: fadeInUp 0.55s var(--ease-out) both; }
.scale-in { animation: scaleIn 0.4s var(--ease-out) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.35s; }

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES
   ══════════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-title { font-size: 1.65rem; font-weight: 800; margin-bottom: 0.5rem; }

.error-msg, .success-msg {
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.error-msg { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); color: #fca5a5; }
.success-msg { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); color: #6ee7b7; }

/* ── WIDGET PAGE ────────────────────────────────────────────── */
.widget-page { background: transparent; overflow: hidden; }

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.8rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.35s var(--ease-out);
    max-width: 360px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}
.toast.success { background: rgba(12, 12, 20, 0.9); border-color: rgba(16, 185, 129, 0.2); }
.toast.error { background: rgba(12, 12, 20, 0.9); border-color: rgba(239, 68, 68, 0.2); }
.toast.info { background: rgba(12, 12, 20, 0.9); border-color: rgba(59, 130, 246, 0.2); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── SPINNER ────────────────────────────────────────────────── */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   HERO BANNER
   ══════════════════════════════════════════════════════════════ */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--secondary-rgb), 0.1) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.3), rgba(var(--secondary-rgb), 0.2), transparent);
}

.hero-content { position: relative; z-index: 2; max-width: 600px; }

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 30%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub { font-size: 1rem; color: var(--text-secondary); font-weight: 500; line-height: 1.6; }

.hero-icon-wrap {
    font-size: 7rem;
    opacity: 0.08;
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    animation: floatIcon 8s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-58%) translateX(-8px) rotate(3deg); }
}

/* ── GAME CARDS ─────────────────────────────────────────────── */
.game-card { transition: all var(--transition-normal); }
.game-card:hover { border-color: rgba(var(--primary-rgb), 0.25); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); }

.game-icon {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    width: 60px; height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.game-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.game-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; margin-bottom: 1.25rem; }

/* ── LANDING NAV ────────────────────────────────────────────── */
body > nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.logo { font-size: 1.4rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 0.25rem; letter-spacing: -0.03em; }
.logo span { color: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   GAME CARDS
   ══════════════════════════════════════════════════════════════ */
.game-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.game-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.game-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    display: inline-block;
}
.game-title {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}
.game-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
}
.game-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.feature-box {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: transform var(--transition-fast), background var(--transition-fast);
}
.feature-box:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}
.feature-icon {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
}
.feature-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.feature-sub {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
}
.game-alert {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.75rem;
    color: #fca5a5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}
.game-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-md);
    color: #fff;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}
.game-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Theme Modifiers */
.theme-amber { border-color: rgba(245, 158, 11, 0.2); }
.theme-amber .game-badge { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.theme-amber .game-icon { color: #f59e0b; filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.5)); }
.theme-amber .feature-icon { color: #f59e0b; }
.theme-amber .game-btn { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }

.theme-blue { border-color: rgba(59, 130, 246, 0.2); }
.theme-blue .game-badge { background: rgba(59, 130, 246, 0.15); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.theme-blue .game-icon { color: #3b82f6; filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.5)); }
.theme-blue .feature-icon { color: #3b82f6; }
.theme-blue .game-btn { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }

.theme-cyan { border-color: rgba(6, 182, 212, 0.2); }
.theme-cyan .game-badge { background: rgba(6, 182, 212, 0.15); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.3); }
.theme-cyan .game-icon { color: #06b6d4; filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.5)); }
.theme-cyan .feature-icon { color: #06b6d4; }
.theme-cyan .game-btn { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3); }

.theme-purple { border-color: rgba(139, 92, 246, 0.2); }
.theme-purple .game-badge { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.3); }
.theme-purple .game-icon { color: #8b5cf6; filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.5)); }
.theme-purple .feature-icon { color: #8b5cf6; }
.theme-purple .game-btn { background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }

.theme-red { border-color: rgba(239, 68, 68, 0.2); }
.theme-red .game-badge { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.theme-red .game-icon { color: #ef4444; filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.5)); }
.theme-red .feature-icon { color: #ef4444; }
.theme-red .game-btn { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3); }

.theme-rose { border-color: rgba(244, 63, 94, 0.2); }
.theme-rose .game-badge { background: rgba(244, 63, 94, 0.15); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.3); }
.theme-rose .game-icon { color: #f43f5e; filter: drop-shadow(0 0 15px rgba(244, 63, 94, 0.5)); }
.theme-rose .feature-icon { color: #f43f5e; }
.theme-rose .game-btn { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3); }

.theme-sky { border-color: rgba(14, 165, 233, 0.2); }
.theme-sky .game-badge { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; border: 1px solid rgba(14, 165, 233, 0.3); }
.theme-sky .game-icon { color: #0ea5e9; filter: drop-shadow(0 0 15px rgba(14, 165, 233, 0.5)); }
.theme-sky .feature-icon { color: #0ea5e9; }
.theme-sky .game-btn { background: linear-gradient(135deg, #0ea5e9, #0284c7); box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-content { padding: 1.5rem; }
}

@media (max-width: 768px) {
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.35rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .modules-grid { grid-template-columns: 1fr; }
    .page-content { padding: 1rem; }
    .connection-badge span { display: none; }
    .auth-card { padding: 1.75rem; }
    .auth-title { font-size: 1.4rem; }
    .modal { padding: 1.5rem; }
    .hero-banner { padding: 2rem 1.5rem; }
    .hero-title { font-size: 1.8rem; }
    .hero-icon-wrap { display: none; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .stat-icon-wrap { width: 40px; height: 40px; font-size: 1.1rem; }
    .stat-value { font-size: 1.2rem; }
    .stat-label { font-size: 0.7rem; }
    .btn { padding: 0.6rem 1.1rem; font-size: 0.82rem; }
    .btn-lg { padding: 0.7rem 1.4rem; font-size: 0.9rem; }
    .glass-card { padding: 1.25rem; border-radius: var(--radius-md); }
}