/* ============================================
   DevHuntAI — Glassmorphic Dark Mode
   Warm Amber + Slate accents
   ============================================ */

/* ─── Root Variables (Dark, default) ─────────────────────── */
:root {
    --primary: #f59e0b;
    --primary-dark: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.4);
    --primary-light: rgba(245, 158, 11, 0.15);
    --accent: #64748b;
    --accent-dark: #475569;
    --accent-glow: rgba(100, 116, 139, 0.25);

    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --bg: #0f0d0a;
    --bg-alt: #1a1612;
    --bg-card: rgba(26, 22, 18, 0.6);
    --border: rgba(245, 158, 11, 0.15);
    --border-glow: rgba(245, 158, 11, 0.25);

    --glass-bg: rgba(26, 22, 18, 0.65);
    --glass-border: rgba(245, 158, 11, 0.2);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.35);

    --hero-bg: linear-gradient(135deg, #1a1206 0%, #1a1612 30%, #12100c 70%, #0f0d0a 100%);
    --form-bg: rgba(15, 13, 10, 0.6);
    --dropdown-bg: rgba(17, 14, 10, 0.95);

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1200px;

    --glow-amber: 0 0 20px rgba(245, 158, 11, 0.3), 0 0 60px rgba(245, 158, 11, 0.1);
    --glow-slate: 0 0 20px rgba(100, 116, 139, 0.2), 0 0 40px rgba(100, 116, 139, 0.08);
    --neon-purple: var(--glow-amber);
    --neon-cyan: var(--glow-slate);
}

/* ─── Light Theme ────────────────────────────────────────── */
:root[data-theme="light"] {
    --text: #1f1a14;
    --text-secondary: #475569;
    --text-muted: #6b7280;
    --bg: #fafaf9;
    --bg-alt: #f5f5f4;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border: rgba(15, 13, 10, 0.08);
    --border-glow: rgba(245, 158, 11, 0.3);

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(15, 13, 10, 0.08);
    --glass-shadow: 0 8px 24px rgba(15, 13, 10, 0.06), 0 2px 6px rgba(15, 13, 10, 0.04);

    --hero-bg: linear-gradient(135deg, #fef3c7 0%, #fff7ed 40%, #fafaf9 100%);
    --form-bg: rgba(255, 255, 255, 0.85);
    --dropdown-bg: rgba(255, 255, 255, 0.97);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 116, 139, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(245, 158, 11, 0.03) 0%, transparent 40%);
    pointer-events: none;
    transition: opacity 0.3s;
}
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 680px; }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245, 158, 11, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245, 158, 11, 0.5); }

/* ─── Navbar (glassmorphic) ──────────────────────────────── */
.navbar {
    border-bottom: 1px solid var(--border);
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
}
.navbar .container {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1.5rem; max-width: var(--max-width); margin: 0 auto;
}
.logo {
    font-size: 1.3rem; font-weight: 800; color: var(--text); text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links { display: flex; gap: 0.75rem; align-items: center; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-auth-mobile { display: none; }  /* hidden on desktop, shown on mobile */
.nav-links .btn-primary { color: #1a1206; }
.nav-links .btn-outline { color: var(--primary); }
.nav-links .btn-primary:hover { color: #1a1206; }
.nav-links .btn-outline:hover { color: var(--primary); }

/* ─── Theme Toggle ───────────────────────────────────────── */
.theme-toggle {
    background: transparent; border: 1px solid var(--glass-border);
    color: var(--text-secondary); cursor: pointer;
    padding: 0.4rem; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline-block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

/* ─── Mobile Nav Toggle ──────────────────────────────────── */
.nav-toggle {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
}
.nav-toggle:hover { color: var(--primary); border-color: var(--primary); }
.nav-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
:root[data-theme="light"] .nav-toggle {
    background: rgba(15, 13, 10, 0.04);
    border-color: rgba(15, 13, 10, 0.12);
}

/* ─── Accessibility helper ───────────────────────────────── */
.visually-hidden {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0,0,0,0) !important;
    white-space: nowrap !important; border: 0 !important;
}
.skip-link {
    position: fixed; top: -100px; left: 1rem;
    background: var(--primary); color: #1a1206;
    padding: 0.6rem 1.25rem; border-radius: var(--radius-sm);
    font-weight: 700; text-decoration: none;
    z-index: 1000; transition: top 0.15s;
}
.skip-link:focus { top: 0.75rem; outline: 2px solid var(--text); outline-offset: 2px; }
main:focus { outline: none; }

/* ─── Search Bar ──────────────────────────────────────────── */
.search-wrapper {
    position: relative; flex: 1; max-width: 360px;
    margin: 0 1rem;
}
.search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none; z-index: 1;
}
.search-input {
    width: 100%; padding: 0.55rem 1rem 0.55rem 2.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text); font-size: 0.9rem; font-family: inherit;
    transition: all 0.2s; outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
    border-color: var(--primary);
    box-shadow: var(--glow-amber);
}
.search-input:focus + .search-kbd { opacity: 0; }
.search-kbd {
    position: absolute; right: 0.55rem; top: 50%;
    transform: translateY(-50%);
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 6px;
    color: var(--text-secondary);
    font-family: inherit; font-size: 0.7rem; font-weight: 600;
    padding: 0.15rem 0.4rem;
    pointer-events: none;
    transition: opacity 0.15s;
    letter-spacing: 0.04em;
}
@media (max-width: 768px) { .search-kbd { display: none; } }

.search-results {
    display: none;
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--dropdown-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    max-height: 340px; overflow-y: auto; z-index: 200;
}
.search-results.active { display: block; }

.search-item {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1rem; text-decoration: none; color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.focused {
    background: var(--primary-light);
}
.search-item-name {
    font-weight: 600; font-size: 0.9rem; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-tagline {
    font-size: 0.8rem; color: var(--text-secondary);
    flex-basis: 100%; margin-top: -0.15rem;
}
.search-item-cat {
    font-size: 0.7rem; font-weight: 600;
    background: var(--primary-light); color: var(--primary);
    padding: 0.15rem 0.5rem; border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    flex-shrink: 0;
}
.search-item mark {
    background: rgba(245, 158, 11, 0.22); color: var(--primary);
    border-radius: 2px; padding: 0 1px;
}
.search-empty {
    padding: 1.5rem 1rem; text-align: center;
    color: var(--text-muted); font-size: 0.9rem;
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        padding: 0.75rem 1rem;
    }
    .logo { order: 1; }
    .nav-auth-mobile {
        order: 2;
        display: flex;
        gap: 0.5rem;
        margin-left: auto;
        margin-right: 0.5rem;
    }
    .nav-auth-mobile .btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .nav-toggle { display: inline-flex; order: 3; margin-left: 0; }
    .search-wrapper {
        order: 4;
        flex-basis: 100%;
        max-width: none;
        margin: 0;
    }
    .nav-links {
        order: 5;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        display: none;
        padding: 0.5rem 0;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
    }
    .nav-links .btn { display: none; }  /* hide auth buttons in dropdown — shown in navbar instead */
    .nav-links.open { display: flex; }
    .nav-links > a {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
        border-radius: var(--radius-sm);
        color: var(--text);
        text-decoration: none;
        font-weight: 500;
        transition: background 0.15s;
    }
    .nav-links > a:hover { background: var(--primary-light); }
    .nav-links .theme-toggle {
        margin: 0.25rem 0.5rem;
        align-self: flex-start;
    }
    .nav-links .btn {
        margin: 0.25rem 0.5rem;
        justify-content: center;
        text-align: center;
        border-radius: var(--radius);
        font-weight: 600;
        padding: 0.75rem 1rem;
    }
    .nav-links .btn-primary {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: #1a1206;
        border: none;
        box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
    }
    .nav-links .btn-outline {
        border: 1.5px solid var(--primary);
        color: var(--primary);
        background: transparent;
    }
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.5rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
    transition: all 0.2s; cursor: pointer; border: 2px solid transparent;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1206; border: none;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.45), 0 0 60px rgba(100, 116, 139, 0.18);
}
.btn-outline {
    color: var(--primary);
    border: 2px solid rgba(245, 158, 11, 0.4);
    background: transparent;
}
.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: var(--neon-purple);
}
.btn-small { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-large { padding: 0.85rem 2rem; font-size: 1.1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { color: #dc2626; border-color: #dc2626; }
.btn-danger:hover { background: rgba(220, 38, 38, 0.1); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
    padding: 5rem 0 4rem;
    background: var(--hero-bg);
    color: var(--text); text-align: center; position: relative; overflow: hidden;
}
:root[data-theme="light"] .hero { color: #1a1612; }
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(245, 158, 11, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(100, 116, 139, 0.08) 0%, transparent 40%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(2rem, 5vw + 0.5rem, 3.5rem);
    font-weight: 800; line-height: 1.15; margin: 0 auto 1rem; position: relative;
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.25);
    max-width: 18ch;
    text-wrap: balance;
}
.hero h1 em { font-style: italic; opacity: 0.85; }
.hero-sub {
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
    opacity: 0.85; margin: 0 auto 2rem; line-height: 1.6; position: relative;
    max-width: 52ch;
    text-wrap: pretty;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }
.hero-stats {
    list-style: none; margin: 2.5rem auto 0; padding: 0;
    display: inline-flex; flex-wrap: wrap; justify-content: center;
    gap: 0.5rem 2rem; position: relative;
    color: var(--text-secondary); font-size: 0.9rem;
}
.hero-stats li { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-stats strong {
    color: var(--primary); font-weight: 700; font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}
.hero-actions .btn-primary {
    background: #fff; color: #1e1508;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    font-weight: 600;
}
.hero-actions .btn-primary:hover { background: #fef3c7; color: #000; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
:root[data-theme="light"] .hero-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1206; box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}
:root[data-theme="light"] .hero-actions .btn-primary:hover { background: var(--primary); color: #1a1206; }
:root[data-theme="light"] .hero-actions .btn-outline {
    border-color: rgba(15, 13, 10, 0.3); color: #1a1612;
}
:root[data-theme="light"] .hero-actions .btn-outline:hover {
    background: rgba(245, 158, 11, 0.1); border-color: var(--primary); color: var(--primary-dark);
}

/* ─── Sections ───────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; }

/* ─── Placeholder Card ────────────────────────────────────── */
.placeholder-card {
    border: 2px dashed var(--border-glow);
    box-shadow: none;
    opacity: 0.6;
    min-height: 160px;
    display: flex; align-items: center; justify-content: center;
}
.placeholder-card:hover {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: var(--glow-amber);
    transform: translateY(-2px);
}
.placeholder-body {
    text-align: center;
    padding: 2rem;
}
.placeholder-body h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.placeholder-body .card-tagline {
    color: var(--text-muted);
    -webkit-line-clamp: unset;
    min-height: unset;
    margin-bottom: 0;
}

/* ─── App Grid ───────────────────────────────────────────── */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.app-grid-dense { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.app-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    overflow: hidden; text-decoration: none; color: var(--text);
    transition: all 0.25s; display: block;
    box-shadow: var(--glass-shadow);
}
.app-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--glass-shadow);
}
.featured-card {
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: var(--glass-shadow);
}

.card-img {
    width: 100%; aspect-ratio: 16 / 9;
    background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1206; font-size: 1.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}
.card-placeholder.large {
    width: 120px; height: 120px; font-size: 3rem;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.35);
}

.card-body { padding: 1.25rem; }
.card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.35rem; }
.card-tagline {
    color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(0.9rem * 1.4 * 2);
}

.card-meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; flex-wrap: wrap;
}
.card-meta-right {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
    margin-left: auto;
}
.card-stat { white-space: nowrap; }
.card-time { color: var(--text-muted); }
.card-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 0.6rem;
    background: var(--bg-alt);
}
.card-img-fallback { background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(100, 116, 139, 0.05)); }
.card-favicon {
    width: 56px !important; height: 56px !important;
    object-fit: contain !important;
    border-radius: 12px;
    background: var(--bg-alt);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.badge {
    background: var(--primary-light); color: var(--primary);
    padding: 0.2rem 0.6rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-large { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
.upvotes { color: var(--accent); font-weight: 600; font-size: 0.85rem; }

.upvote-btn {
    background: none; border: none;
    color: var(--text-secondary); font-weight: 700; font-size: 0.85rem; cursor: pointer;
    padding: 0.25rem 0.4rem; font-family: inherit; transition: all 0.15s;
    border-radius: var(--radius-sm);
}
.upvote-btn:hover { color: var(--primary); background: var(--primary-light); }
.upvote-btn:active { transform: scale(1.2); }
.upvote-big { font-size: 1.25rem; padding: 0.5rem 0.75rem; }
.upvote-btn.voted { color: #22c55e; }
.upvote-btn.popping { animation: pop 0.3s ease; }
/* ─── #1 App — Golden Glow ────────────────────────────────── */
.app-card.top-app {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25), 0 0 60px rgba(245, 158, 11, 0.12), var(--glass-shadow);
    position: relative;
}
.app-card.top-app::before {
    content: '🏆 #1 Today';
    position: absolute;
    top: 0.5rem; right: 0.5rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.7rem; font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    z-index: 2;
    letter-spacing: 0.02em;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ─── Category Bar ───────────────────────────────────────── */
.category-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.cat-chip {
    padding: 0.4rem 1rem; border-radius: 999px;
    font-size: 0.85rem; font-weight: 500; text-decoration: none;
    color: var(--text-secondary);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.cat-chip:hover {
    background: var(--primary-light); color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--neon-purple);
}
.cat-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: var(--primary);
    box-shadow: var(--neon-purple);
}
.cat-chip span { opacity: 0.7; font-size: 0.8rem; }

/* ─── Sort Bar ───────────────────────────────────────────── */
.sort-bar { display: flex; gap: 0.75rem; margin-bottom: 2rem; }
.sort-chip {
    padding: 0.4rem 1rem; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; text-decoration: none;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.sort-chip:hover { color: var(--primary); border-color: var(--primary); }
.sort-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: transparent;
    box-shadow: var(--neon-purple);
}

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 1.5rem; margin-top: 3rem;
}
.page-info { color: var(--text-secondary); font-weight: 500; }

/* ─── App Detail ─────────────────────────────────────────── */
.app-detail { max-width: 900px; margin: 0 auto; }
.detail-header { display: flex; gap: 2rem; align-items: flex-start; margin-bottom: 3rem; }
.detail-img {
    width: 320px; height: 200px; flex-shrink: 0;
    border-radius: var(--radius); overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-info h1 { font-size: 2rem; font-weight: 800; margin: 0.75rem 0 0.5rem; }
.detail-tagline { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.detail-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.btn-share { padding: 0.55rem 1rem; }
.btn-share.shared { color: #22c55e; border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.08); }

.detail-body { display: grid; grid-template-columns: 1fr 240px; gap: 2rem; }
.detail-main h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--primary); }
.app-description { color: var(--text-secondary); line-height: 1.75; margin-bottom: 2rem; }
.app-description p { margin-bottom: 1rem; }
.app-description p:last-child { margin-bottom: 0; }
.app-description ul, .app-description ol { margin: 0 0 1rem 1.25rem; padding-left: 0.5rem; }
.app-description li { margin-bottom: 0.4rem; }
.app-description a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.app-description a:hover { color: var(--primary-dark); }
.app-description code {
    background: rgba(100, 116, 139, 0.18); color: var(--text);
    padding: 0.12rem 0.4rem; border-radius: 4px;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.85em;
}
.app-description pre {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}
.app-description pre code {
    background: transparent; padding: 0; border-radius: 0; font-size: 0.85em;
}
.app-description blockquote {
    border-left: 3px solid var(--primary);
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 0 0 1rem 0; color: var(--text-secondary);
    font-style: italic;
}
.app-description h2, .app-description h3, .app-description h4 {
    margin: 1.5rem 0 0.5rem; color: var(--text);
}
.app-description h2 { font-size: 1.15rem; }
.app-description h3 { font-size: 1rem; }
.app-description h4 { font-size: 0.95rem; }
.detail-meta-row {
    padding: 0.75rem 0; border-top: 1px solid var(--border);
    font-size: 0.95rem; color: var(--text-secondary);
}
.detail-meta-row strong { color: var(--text); margin-right: 0.5rem; }
.x-link { color: var(--accent); text-decoration: none; margin-left: 0.5rem; font-weight: 500; }
.x-link:hover { text-decoration: underline; }
.gh-link { color: var(--primary); }

.verified-badge {
    background: rgba(34, 197, 94, 0.1); color: #22c55e;
    padding: 0.75rem 1rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem; text-align: center;
    border: 1px solid rgba(34, 197, 94, 0.3);
    backdrop-filter: blur(8px);
}
.pending-badge {
    background: rgba(234, 179, 8, 0.1); color: #eab308;
    padding: 0.75rem 1rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem; text-align: center;
    border: 1px dashed rgba(234, 179, 8, 0.4);
}

.related-section { margin-top: 4rem; }
.related-section h2 { margin-bottom: 1.5rem; }

/* ─── Detail Sidebar ─────────────────────────────────────── */
.detail-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
}
.sidebar-heading {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-secondary); margin-bottom: 0.85rem;
}
.sidebar-stats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.5rem; text-align: center;
}
.sidebar-stat { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.25rem 0; }
.sidebar-stat-value {
    font-size: 1.5rem; font-weight: 800; color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.sidebar-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.maker-block {
    display: flex; align-items: center; gap: 0.75rem;
    text-decoration: none; color: var(--text);
    padding: 0.5rem; margin: -0.5rem -0.5rem 0;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.maker-block:hover { background: rgba(245, 158, 11, 0.08); }
.maker-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #1a1206; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1rem; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}
.maker-meta { display: flex; flex-direction: column; min-width: 0; }
.maker-name { font-weight: 600; color: var(--text); }
.maker-handle { font-size: 0.8rem; color: var(--text-muted); }

.sidebar-links { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.85rem; }
.sidebar-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.75rem; margin: 0 -0.5rem;
    color: var(--text-secondary); text-decoration: none;
    border-radius: var(--radius-sm); font-size: 0.85rem;
    transition: all 0.15s;
}
.sidebar-link:hover { color: var(--primary); background: rgba(245, 158, 11, 0.06); }

.tech-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tech-chip {
    background: rgba(100, 116, 139, 0.12); color: var(--text);
    padding: 0.25rem 0.6rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 500;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.sidebar-card-meta { padding: 0.5rem 1.25rem; }
.sidebar-meta-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 0; font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}
.sidebar-meta-row:last-child { border-bottom: none; }
.sidebar-meta-value, .sidebar-meta-row time { color: var(--text); font-weight: 500; }

/* ─── CTA Box ────────────────────────────────────────────── */
.cta-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(100, 116, 139, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius); padding: 3rem 2rem; text-align: center; color: var(--text);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}
.cta-box h2 { font-size: 2rem; margin-bottom: 0.75rem; }
.cta-box p { font-size: 1.1rem; opacity: 0.8; margin-bottom: 1.5rem; color: var(--text-secondary); }
.cta-box .btn-primary { background: linear-gradient(135deg, var(--primary), #d97706); color: #0f0d0a; font-weight: 700; }
.cta-box .btn-primary:hover { box-shadow: 0 0 30px rgba(245, 158, 11, 0.5); }

/* ─── Forms ──────────────────────────────────────────────── */
.page-header { text-align: center; margin-bottom: 3rem; }
.page-header h1 { font-size: 2.25rem; font-weight: 800; }
.subtitle { color: var(--text-secondary); font-size: 1.1rem; }

.submit-form {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-top: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; }
.optional-label { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit;
    background: var(--form-bg); color: var(--text);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group select { appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1 6,7 11,1'/></svg>");
    background-repeat: no-repeat; background-position: right 1rem center;
    padding-right: 2.5rem;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), var(--neon-purple);
}
.field-hint { display: block; margin-top: 0.4rem; font-size: 0.8rem; color: var(--text-secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-error {
    background: rgba(239, 68, 68, 0.1); color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.75rem 1rem; border-radius: var(--radius-sm);
    margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 500;
}
.form-footer { text-align: center; margin-top: 1.5rem; color: var(--text-secondary); }
.form-footer a { color: var(--primary); }

/* ─── Error Page ─────────────────────────────────────────── */
.error-page { text-align: center; padding: 6rem 0; }
.error-code { font-size: 4rem; }
.error-message { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2rem; }
.error-page .btn { margin-top: 0; }

/* ─── Password toggle ────────────────────────────────────── */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 3rem; }
.password-toggle {
    position: absolute; right: 0.6rem; top: 50%;
    transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer;
    color: var(--text-muted); padding: 0.4rem;
    border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.15s;
}
.password-toggle:hover { color: var(--primary); }
.password-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ─── Divider ────────────────────────────────────────────── */
.divider {
    display: flex; align-items: center; gap: 1rem;
    margin: 1.5rem 0; color: var(--text-muted); font-size: 0.85rem;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.divider span { flex-shrink: 0; }

/* ─── Google sign-in button ──────────────────────────────── */
.google-btn {
    display: inline-flex !important;
    align-items: center; justify-content: center; gap: 0.6rem;
    background: var(--glass-bg); color: var(--text);
    border: 1px solid var(--border);
    font-weight: 500; text-decoration: none;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}
.google-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: var(--neon-purple);
}
.google-icon { flex-shrink: 0; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 3.5rem 2rem;
    color: var(--text-secondary); font-size: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius);
    max-width: 520px; margin: 2rem auto;
}
.empty-state::before {
    content: '';
    display: block; font-size: 2rem; margin-bottom: 0.75rem;
    opacity: 0.7;
}
.empty-state a {
    color: var(--primary); font-weight: 600;
    text-decoration: underline; text-underline-offset: 3px;
}
.empty-state a.btn { color: #fff; text-decoration: none; }
.empty-state a:hover { color: var(--primary-dark); }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    color: var(--text-muted); font-size: 0.9rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}
.footer-brand .logo { font-size: 1.1rem; }
.footer-tagline { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.85rem; max-width: 28ch; }
.footer-col h4 {
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-secondary); margin-bottom: 0.85rem;
}
.footer-col a {
    display: block; color: var(--text-muted); text-decoration: none;
    padding: 0.25rem 0; font-size: 0.9rem; transition: color 0.15s;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
    margin-top: 2rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ─── Admin Panel ────────────────────────────────────────── */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--glass-shadow);
    transition: all 0.2s;
}
.stat-card:hover { border-color: var(--primary); box-shadow: var(--glass-shadow), var(--neon-purple); }
.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.stat-warn { border-color: rgba(234, 179, 8, 0.4); }
.stat-warn .stat-value {
    background: none;
    -webkit-text-fill-color: #eab308;
    color: #eab308;
}

.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.admin-table th {
    text-align: left; padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(245, 158, 11, 0.3);
    color: var(--text-secondary); font-weight: 600;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.admin-table tr:hover td { background: rgba(245, 158, 11, 0.04); }
.row-pending { background: rgba(234, 179, 8, 0.05); }
.table-tagline { color: var(--text-secondary); font-size: 0.8rem; margin-top: 0.2rem; max-width: 300px; }
.status-ok { color: #22c55e; font-weight: 600; }
.status-pending { color: #eab308; font-weight: 600; }
.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline; margin-right: 0.25rem; }

/* ─── Score badges ───────────────────────────────────────── */
.score-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.2rem; height: 2.2rem; border-radius: 50%;
    font-weight: 700; font-size: 0.8rem; border: none; cursor: pointer;
    font-family: inherit; transition: transform 0.15s;
}
.score-badge:hover { transform: scale(1.1); }
.score-good { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.score-ok { background: rgba(234, 179, 8, 0.1); color: #eab308; border: 1px solid rgba(234, 179, 8, 0.3); }
.score-bad { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.score-dead { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); cursor: default; font-size: 1rem; border: 1px solid rgba(100, 116, 139, 0.2); }
.score-none { background: rgba(100, 116, 139, 0.05); color: var(--text-muted); cursor: default; }

/* ─── Check detail row ───────────────────────────────────── */
.check-detail-row td { padding: 0; background: var(--bg-alt); }
.check-detail-box { padding: 1rem 1.5rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.5rem; }
.check-item {
    display: flex; gap: 0.5rem; align-items: flex-start;
    padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.check-pass { background: rgba(34, 197, 94, 0.06); }
.check-fail { background: rgba(239, 68, 68, 0.06); }
.check-icon { flex-shrink: 0; font-size: 1rem; }
.check-item strong { display: block; font-size: 0.85rem; }
.check-detail { display: block; color: var(--text-secondary); font-size: 0.78rem; margin-top: 0.15rem; }
.check-points { display: block; font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.1rem; font-weight: 600; }

/* ─── Maker link ──────────────────────────────────────────── */
.maker-link {
    color: var(--primary); text-decoration: none; font-weight: 600;
}
.maker-link:hover { text-decoration: underline; }

/* ─── Comments ────────────────────────────────────────────── */
.comments-section {
    margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.comments-section h2 {
    font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--text);
}

.comment-form { margin-bottom: 2rem; }
.comment-form textarea {
    width: 100%; min-height: 80px; padding: 0.75rem 1rem;
    background: var(--form-bg); color: var(--text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    font-size: 0.95rem; font-family: inherit; resize: vertical;
    transition: all 0.2s; margin-bottom: 0.75rem;
}
.comment-form textarea::placeholder { color: var(--text-muted); }
.comment-form textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.comment-login-prompt { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.comment-login-prompt a { color: var(--primary); }

.comments-list { display: flex; flex-direction: column; gap: 1rem; }
.comment {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.comment-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.5rem;
}
.comment-author { font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.comment-date { font-size: 0.8rem; color: var(--text-muted); }
.comment-body { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }
.comment-body p { margin-bottom: 0.5rem; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-body a { color: var(--primary); text-decoration: underline; }
.comment-body code {
    background: rgba(100, 116, 139, 0.18); padding: 0.1rem 0.35rem;
    border-radius: 4px; font-family: 'SFMono-Regular', Menlo, monospace; font-size: 0.85em;
}

/* ─── XP & Leaderboard ────────────────────────────────────── */
.xp-legend {
    display: flex; gap: 1rem; margin-bottom: 1.5rem;
    font-size: 0.8rem; color: var(--text-muted);
}
.xp-legend span {
    background: var(--glass-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.3rem 0.7rem;
}

.xp-badge {
    display: inline-block; margin-bottom: 0.25rem;
    padding: 0.25rem 0.75rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
    text-transform: uppercase;
}
.xp-badge-prompt-apprentice { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }
.xp-badge-vibe-engineer { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.xp-badge-ai-alchemist { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.xp-badge-neural-architect { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.xp-badge-singularity-sorcerer { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.xp-badge-grand-vibe-master {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(139, 92, 246, 0.2));
    color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.4);
}

.leaderboard-list { display: flex; flex-direction: column; gap: 0.5rem; }
.lb-row {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.75rem 1rem; border-radius: var(--radius);
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    text-decoration: none; color: var(--text);
    transition: all 0.2s;
}
.lb-row:hover { border-color: var(--primary); transform: translateX(4px); }
.lb-rank { font-size: 1.1rem; font-weight: 800; min-width: 3rem; color: var(--text-muted); }
.lb-gold { border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 0 15px rgba(245, 158, 11, 0.1); }
.lb-gold .lb-rank { color: #f59e0b; }
.lb-silver { border-color: rgba(148, 163, 184, 0.4); }
.lb-silver .lb-rank { color: #94a3b8; }
.lb-bronze { border-color: rgba(180, 83, 9, 0.35); }
.lb-bronze .lb-rank { color: #b45309; }
.lb-info { flex: 1; }
.lb-name { font-weight: 600; display: block; }
.lb-rank-title { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.lb-stats { display: flex; gap: 0.75rem; align-items: center; }
.lb-stat { font-size: 0.8rem; color: var(--text-muted); }
.lb-xp { font-weight: 700; color: var(--primary); font-size: 0.9rem; min-width: 4rem; text-align: right; }

/* ─── Analytics ───────────────────────────────────────────── */
.analytics-totals {
    display: flex; gap: 1rem; margin-bottom: 2rem;
}
.total-card {
    flex: 1; background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.total-value { display: block; font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.total-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

.analytics-table-wrap { overflow-x: auto; }
.analytics-table { width: 100%; border-collapse: collapse; }
.analytics-table th {
    text-align: left; padding: 0.75rem 1rem; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
    border-bottom: 2px solid var(--glass-border);
}
.analytics-table td {
    padding: 1rem; border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
}
.analytics-table tr:hover td { background: var(--glass-bg); }
.num-cell { font-variant-numeric: tabular-nums; text-align: right !important; }
.app-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.app-name { font-weight: 600; color: var(--text); text-decoration: none; }
.app-name:hover { color: var(--primary); }
.app-category { font-size: 0.75rem; color: var(--text-muted); }

.verified-badge {
    display: inline-block; color: #22c55e; font-weight: 700; font-size: 0.85rem;
    margin-left: 0.3rem; text-decoration: none;
}
.verified-badge:hover { color: #16a34a; }

.status-badge {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
}
.status-live { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.status-pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.analytics-footer { margin-top: 2rem; font-size: 0.8rem; color: var(--text-muted); }
.analytics-footer p { max-width: 40rem; }

/* ─── App Detail MRR ──────────────────────────────────────── */
.sidebar-mrr {
    border-top: 1px solid var(--glass-border);
    margin-top: 0.75rem; padding-top: 0.75rem; text-align: center;
}
.sidebar-mrr-value { display: block; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.sidebar-mrr-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }
.verified-link { color: #22c55e; text-decoration: none; font-weight: 700; }
.verified-link:hover { color: #16a34a; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .detail-header { flex-direction: column; }
    .detail-img { width: 100%; }
    .detail-body { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .app-grid { grid-template-columns: 1fr; }
}

/* ─── Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .app-card:hover,
    .btn-primary:hover,
    .lb-row:hover,
    .upvote-btn:active,
    .score-badge:hover {
        transform: none !important;
    }
    .upvote-btn.popping { animation: none !important; }
}
