/* ========================================================================
   XBOT — Warm Glassmorphism Theme (lovable.dev inspired)
   Raleway + JetBrains Mono | Warm cream palette | Aurora mesh background
   ======================================================================== */

:root {
    /* ── Warm base palette (lovable-style cream whites) ── */
    --bg:              #FDFCF9;
    --bg-depth:        #F0EFEB;
    --bg-base:         #F5F4F0;
    --bg-surface:      #FFFFFF;
    --bg-translucent:  rgba(255, 255, 252, 0.72);
    --bg-card:         rgba(255, 255, 255, 0.6);
    --bg-card-hover:   rgba(255, 255, 255, 0.78);
    --bg-elevated:     rgba(255, 255, 255, 0.85);

    /* ── Accent: warm orange family ── */
    --accent:          #e8590c;
    --accent-dark:     #c2410c;
    --accent-light:    #fb923c;
    --accent-subtle:   rgba(249, 115, 22, 0.08);
    --accent-hover:    rgba(249, 115, 22, 0.12);
    --gradient:        linear-gradient(135deg, #f97316, #ef4444, #ec4899);
    --gradient-warm:   linear-gradient(135deg, #f97316, #f59e0b);
    --gradient-btn:    linear-gradient(135deg, #f97316, #ea580c);
    /* lovable-style rainbow for accent text */
    --gradient-text:   linear-gradient(90deg, #82BCFF, #2483FF, #FF66F4, #FF3029, #FE7B02);

    /* ── Secondary tones ── */
    --cyan:            #0891b2;
    --cyan-bg:         rgba(8, 145, 178, 0.07);
    --emerald:         #059669;
    --emerald-bg:      rgba(5, 150, 105, 0.07);
    --rose:            #e11d48;
    --rose-bg:         rgba(225, 29, 72, 0.07);
    --purple:          #7c3aed;
    --purple-bg:       rgba(124, 58, 237, 0.07);

    /* ── Text — warm near-blacks ── */
    --text:            #1e1b2e;
    --text2:           #4a4660;
    --text3:           #8e8aa3;
    --text-white:      #ffffff;

    /* ── Borders — warm subtle ── */
    --border:          rgba(0, 0, 0, 0.055);
    --border-hover:    rgba(0, 0, 0, 0.1);
    --border-accent:   rgba(249, 115, 22, 0.22);
    --border-glass:    rgba(255, 255, 255, 0.65);

    /* ── Typography — Raleway ── */
    --font:   'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-h: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:   'JetBrains Mono', 'Fira Code', monospace;

    /* ── Radii (rounded, modern) ── */
    --radius:    14px;
    --radius-sm: 10px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* ── Shadows — lovable-style multi-layer ── */
    --shadow-xs:   0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow:      0 4px 16px rgba(0,0,0,0.05), 0 1px 4px rgba(0,0,0,0.03);
    --shadow-lg:   0 12px 40px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.03);
    --shadow-glow: 0 8px 32px rgba(249,115,22,0.1);
    /* Inset button shadow (lovable-style raised) */
    --shadow-btn:  inset 0 1px 0 0 rgba(255,255,255,0.8),
                   inset 0 -1px 0 0 rgba(255,255,255,0.4),
                   0 2px 4px -1px rgba(0,0,0,0.06),
                   0 4px 6px -2px rgba(0,0,0,0.03);

    /* ── Motion ── */
    --transition:      0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* =====================================================================
   AURORA BACKGROUND — lovable.dev-style soft blurred orbs
   ===================================================================== */
.aurora-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
}
/* Orange — top left, warm hero glow */
.aurora-orb--orange {
    width: 650px; height: 650px;
    background: radial-gradient(circle, rgba(254,123,2,0.22) 0%, rgba(249,158,11,0.08) 50%, transparent 70%);
    top: -8%; left: -6%;
    animation: auroraFloat1 20s ease-in-out infinite;
}
/* Blue — right side accent */
.aurora-orb--blue {
    width: 550px; height: 550px;
    background: radial-gradient(circle, rgba(36,131,255,0.16) 0%, rgba(130,188,255,0.06) 50%, transparent 70%);
    top: 8%; right: -8%;
    animation: auroraFloat2 24s ease-in-out infinite;
}
/* Pink / magenta — center right */
.aurora-orb--pink {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,102,244,0.14) 0%, rgba(236,72,153,0.05) 50%, transparent 70%);
    top: 35%; right: 10%;
    animation: auroraFloat3 22s ease-in-out infinite;
}
/* Purple — bottom left */
.aurora-orb--purple {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(142,72,255,0.12) 0%, rgba(124,58,237,0.04) 50%, transparent 70%);
    bottom: -5%; left: 15%;
    animation: auroraFloat4 26s ease-in-out infinite;
}
/* Cyan — bottom right, subtle cool accent */
.aurora-orb--cyan {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(34,211,238,0.1) 0%, transparent 65%);
    bottom: 10%; right: 25%;
    animation: auroraFloat5 28s ease-in-out infinite;
}

@keyframes auroraFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 30px) scale(1.08); }
    66% { transform: translate(-30px, -20px) scale(0.95); }
}
@keyframes auroraFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 35px) scale(0.94); }
    66% { transform: translate(25px, -30px) scale(1.06); }
}
@keyframes auroraFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-35px, 20px) scale(0.96); }
    75% { transform: translate(20px, 35px) scale(1.02); }
}
@keyframes auroraFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(35px, -25px) scale(1.04); }
    66% { transform: translate(-25px, 30px) scale(0.97); }
}
@keyframes auroraFloat5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -25px) scale(1.06); }
}

/* Subtle grain overlay for depth (lovable-style) */
.aurora-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 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.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .aurora-orb { animation: none !important; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.09); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.16); }

/* =====================================================================
   SCROLL ANIMATIONS
   ===================================================================== */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-in.is-visible { opacity: 1; transform: translateY(0); }
.animate-in.delay-1 { transition-delay: 0.07s; }
.animate-in.delay-2 { transition-delay: 0.14s; }
.animate-in.delay-3 { transition-delay: 0.21s; }
.animate-in.delay-4 { transition-delay: 0.28s; }
.animate-in.delay-5 { transition-delay: 0.35s; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lb-row, .tweet-card, .user-card {
    animation: fadeSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Grid stagger */
.user-card-grid > *:nth-child(1)  { animation-delay: 0s; }
.user-card-grid > *:nth-child(2)  { animation-delay: 0.04s; }
.user-card-grid > *:nth-child(3)  { animation-delay: 0.08s; }
.user-card-grid > *:nth-child(4)  { animation-delay: 0.12s; }
.user-card-grid > *:nth-child(5)  { animation-delay: 0.16s; }
.user-card-grid > *:nth-child(6)  { animation-delay: 0.20s; }
.user-card-grid > *:nth-child(7)  { animation-delay: 0.24s; }
.user-card-grid > *:nth-child(8)  { animation-delay: 0.28s; }
.user-card-grid > *:nth-child(9)  { animation-delay: 0.32s; }
.user-card-grid > *:nth-child(10) { animation-delay: 0.36s; }
.user-card-grid > *:nth-child(11) { animation-delay: 0.40s; }
.user-card-grid > *:nth-child(12) { animation-delay: 0.44s; }

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 24px rgba(249,115,22,0.1); }
    50%      { box-shadow: 0 0 36px rgba(249,115,22,0.18); }
}
.count-up { display: inline-block; }

/* =====================================================================
   TOP BAR — frosted glass navbar
   ===================================================================== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1050;
    background: rgba(253, 252, 249, 0.55);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    height: 58px;
    transition: background var(--transition), box-shadow var(--transition);
}
.topbar.scrolled {
    background: rgba(253, 252, 249, 0.82);
    box-shadow: 0 1px 12px rgba(0,0,0,0.04), 0 4px 24px rgba(0,0,0,0.03);
}
.topbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 58px;
}
.topbar-brand img {
    height: 30px; display: block;
    transition: transform var(--transition), opacity var(--transition);
}
.topbar-brand:hover img { transform: scale(1.04); opacity: 0.85; }

/* Desktop nav */
.topbar-nav { display: flex; gap: 2px; align-items: center; }
.topbar-link {
    color: var(--text2); text-decoration: none;
    font-size: 0.82rem; font-weight: 600;
    padding: 8px 14px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 6px;
    transition: all var(--transition);
    position: relative;
    letter-spacing: 0.01em;
}
.topbar-link:hover {
    color: var(--text);
    background: rgba(0,0,0,0.035);
}
.topbar-link.is-active {
    color: var(--accent);
    background: var(--accent-subtle);
    font-weight: 700;
}
.topbar-link i { font-size: 0.95rem; }

/* Hamburger */
.topbar-burger {
    display: none; background: none; border: none;
    color: var(--text2); font-size: 1.5rem; padding: 4px;
    cursor: pointer; line-height: 1;
    transition: color var(--transition);
}
.topbar-burger:hover { color: var(--accent); }

@media (max-width: 767px) {
    .topbar-nav { display: none; }
    .topbar-burger { display: block; }
}

/* ── Drawer (Mobile) ── */
.drawer {
    background: rgba(253,252,249,0.92) !important;
    backdrop-filter: blur(24px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
    border-left: 1px solid rgba(0,0,0,0.05) !important;
    width: 280px !important;
}
.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}
.drawer-close {
    background: none; border: none; color: var(--text3);
    font-size: 1.2rem; cursor: pointer; padding: 4px; line-height: 1;
    transition: color var(--transition);
}
.drawer-close:hover { color: var(--text); }
.drawer-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.drawer-link {
    color: var(--text2); text-decoration: none;
    font-size: 0.9rem; font-weight: 600;
    padding: 12px 14px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 10px;
    transition: all var(--transition);
}
.drawer-link:hover { background: rgba(0,0,0,0.035); color: var(--text); }
.drawer-link.is-active { background: var(--accent-subtle); color: var(--accent); }
.drawer-link i { font-size: 1.1rem; }

/* ── Main content offset ── */
.main-wrap { padding-top: 74px; padding-bottom: 48px; position: relative; z-index: 1; }

/* =====================================================================
   PAGE HERO
   ===================================================================== */
.page-hero { margin-bottom: 28px; }
.page-hero h1 {
    font-family: var(--font-h);
    font-size: 2.2rem; font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--text);
    line-height: 1.1;
}
.page-hero .hero-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-hero .hero-sub {
    font-size: 0.88rem; color: var(--text3); margin-top: 6px; font-weight: 500;
}

/* =====================================================================
   CARDS — GLASSMORPHISM
   ===================================================================== */
.arena-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.arena-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.arena-card--featured {
    border-color: rgba(249,115,22,0.12);
    background: rgba(255,255,255,0.68);
}
.arena-card--featured::before {
    content: ''; display: block; height: 3px;
    background: var(--gradient);
}
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.35);
}
.card-head h2 {
    font-size: 0.86rem; font-weight: 700; margin: 0;
    display: flex; align-items: center; gap: 8px; color: var(--text);
    letter-spacing: -0.01em;
}
.card-head .tag {
    font-family: var(--mono); font-size: 0.56rem; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.06em;
    transition: all var(--transition);
}
.card-head .tag--gold {
    background: var(--accent-subtle); color: var(--accent);
    border: 1px solid rgba(249,115,22,0.1);
}
.card-head .tag--gold:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(249,115,22,0.08);
}
.card-body-inner { padding: 0; }

/* =====================================================================
   LEADERBOARD ROWS
   ===================================================================== */
.lb-row {
    display: flex; align-items: center;
    padding: 10px 18px; gap: 12px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.lb-row:last-child { border-bottom: none; }
.lb-row:hover { background: rgba(249,115,22,0.025); }

.lb-rank {
    font-family: var(--mono); font-size: 0.75rem; font-weight: 700;
    width: 28px; text-align: center; color: var(--text3); flex-shrink: 0;
}
.lb-rank.rank-1 { color: var(--accent); font-weight: 800; }
.lb-rank.rank-2 { color: #64748b; }
.lb-rank.rank-3 { color: #b45309; }

.lb-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(251,146,60,0.1), rgba(249,115,22,0.04));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; color: var(--accent);
    flex-shrink: 0; overflow: hidden;
    border: 1.5px solid rgba(249,115,22,0.08);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.lb-row:hover .lb-avatar {
    border-color: rgba(249,115,22,0.2);
    box-shadow: 0 0 14px rgba(249,115,22,0.08);
}
.lb-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lb-info { flex: 1; min-width: 0; }
.lb-name {
    font-size: 0.82rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-name a {
    text-decoration: none; color: var(--text);
    transition: color var(--transition);
}
.lb-name a:hover { color: var(--accent); }
.lb-subtitle { font-size: 0.7rem; color: var(--text3); font-weight: 500; }
.lb-value {
    font-family: var(--mono); font-weight: 700; font-size: 0.8rem;
    color: var(--accent-dark); flex-shrink: 0;
}
.lb-stats { display: flex; gap: 10px; flex-shrink: 0; }
.lb-stat { text-align: center; min-width: 42px; }
.lb-stat-label {
    font-family: var(--mono); font-size: 0.5rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text3); display: block;
}
.lb-stat-value {
    font-family: var(--mono); font-size: 0.72rem; font-weight: 700; color: var(--text);
}

/* =====================================================================
   TABS
   ===================================================================== */
.tab-bar {
    display: flex; gap: 3px; padding: 4px;
    background: rgba(255,255,255,0.55);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    overflow-x: auto; margin-bottom: 16px;
    scrollbar-width: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-xs);
}
.tab-bar::-webkit-scrollbar { display: none; }
.filter-tab {
    padding: 7px 16px; font-family: var(--font);
    font-size: 0.75rem; font-weight: 600; border: none;
    background: transparent; color: var(--text3);
    border-radius: var(--radius-sm);
    cursor: pointer; transition: all var(--transition);
    white-space: nowrap; letter-spacing: 0.01em;
}
.filter-tab:hover { color: var(--text); background: rgba(0,0,0,0.03); }
.filter-tab.active {
    color: var(--text-white);
    background: var(--gradient-btn);
    font-weight: 700;
    box-shadow: var(--shadow-btn), 0 2px 10px rgba(249,115,22,0.18);
}

/* =====================================================================
   TWEETS
   ===================================================================== */
.tweets-page { max-width: 600px; margin: 0 auto; }
.tweet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 16px 18px; margin-bottom: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}
.tweet-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}
.tweet-retweet {
    font-size: 0.7rem; color: var(--text3); font-weight: 600;
    display: flex; align-items: center; gap: 4px;
    padding-bottom: 6px; margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.tweet-retweet i { font-size: 0.85rem; color: var(--emerald); }
.tweet-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tweet-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(251,146,60,0.1), rgba(249,115,22,0.04));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: var(--accent);
    flex-shrink: 0; overflow: hidden;
    border: 1.5px solid rgba(249,115,22,0.08);
}
.tweet-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tweet-user-info { flex: 1; min-width: 0; }
.tweet-username { font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tweet-time { font-family: var(--mono); font-size: 0.65rem; color: var(--text3); flex-shrink: 0; }
.tweet-link { text-decoration: none; color: var(--text); font-weight: 700; transition: color var(--transition); }
.tweet-link:hover { color: var(--accent); }
.tweet-room-link { font-size: 0.72rem; color: var(--text3); text-decoration: none; transition: color var(--transition); }
.tweet-room-link:hover { color: var(--cyan); }
.tweet-content { font-size: 0.86rem; line-height: 1.65; color: var(--text2); word-break: break-word; }
.tweet-media { margin-top: 12px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.tweet-media img { width: 100%; display: block; max-height: 360px; object-fit: cover; }
.tweet-media audio { width: 100%; display: block; }
.tweet-media--audio { padding: 8px; background: rgba(0,0,0,0.015); }
.tweet-footer {
    display: flex; align-items: center; gap: 20px;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--border); flex-wrap: wrap;
}
.tweet-action {
    display: flex; align-items: center; gap: 5px;
    font-family: var(--mono); font-size: 0.7rem; color: var(--text3);
    transition: color var(--transition); cursor: default;
}
.tweet-action:hover { color: var(--accent); }
.tweet-action i { font-size: 0.82rem; }
.tweet-opened { font-size: 0.72rem; color: var(--text3); display: flex; align-items: center; gap: 4px; padding: 6px 0 0; }

/* Replies */
.tweet-replies { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.reply-row { display: flex; gap: 8px; padding: 8px 0; align-items: flex-start; }
.reply-row + .reply-row { border-top: 1px solid var(--border); }
.reply-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(251,146,60,0.1), rgba(249,115,22,0.04));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; font-weight: 700; color: var(--accent);
    flex-shrink: 0; overflow: hidden;
}
.reply-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.reply-body { flex: 1; min-width: 0; }
.reply-head { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.reply-head .tweet-link { font-size: 0.72rem; }
.reply-head .tweet-room-link { font-size: 0.65rem; }
.reply-time { font-family: var(--mono); font-size: 0.58rem; color: var(--text3); margin-left: auto; }
.reply-text { font-size: 0.78rem; color: var(--text2); line-height: 1.5; }
.reply-more { font-size: 0.68rem; color: var(--text3); padding: 4px 0; }

/* Tweet search/filter */
.tweet-search-bar { margin-bottom: 16px; }
.tweet-search-form { display: flex; gap: 8px; }
.tweet-search-form .x-input { flex: 1; max-width: 260px; }
.tweet-clear-filter {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--accent); font-size: 0.75rem; font-weight: 600; text-decoration: none;
    padding: 6px 14px; border-radius: var(--radius-sm);
    background: var(--accent-subtle); margin-bottom: 16px;
    border: 1px solid rgba(249,115,22,0.08);
    transition: all var(--transition);
}
.tweet-clear-filter:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(249,115,22,0.06); }

/* =====================================================================
   STAT CARDS
   ===================================================================== */
.stat-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 22px; text-align: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    position: relative; overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card--gold::before    { background: var(--gradient-warm); }
.stat-card--cyan::before    { background: linear-gradient(90deg, #06b6d4, #0891b2); }
.stat-card--emerald::before { background: linear-gradient(90deg, #10b981, #059669); }

.stat-number {
    font-family: var(--font-h); font-size: 2.1rem; font-weight: 800;
    line-height: 1; letter-spacing: -0.03em;
}
.stat-number--gold    { color: var(--accent); }
.stat-number--cyan    { color: var(--cyan); }
.stat-number--emerald { color: var(--emerald); }
.stat-label {
    font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text3); margin-top: 6px;
}

/* =====================================================================
   HOME GRID
   ===================================================================== */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 992px) { .home-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   USER CARD GRID
   ===================================================================== */
.user-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.user-card {
    display: flex; flex-direction: column;
    text-align: center; text-decoration: none; color: var(--text);
    border-radius: var(--radius);
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.5);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
    position: relative;
    cursor: pointer;
}
.user-card:hover {
    border-color: rgba(249,115,22,0.18);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
    color: var(--text);
}
.user-card-rank {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    font-family: var(--mono); font-size: 0.56rem; font-weight: 700;
    background: rgba(255,255,255,0.8); color: var(--text3);
    padding: 2px 7px; border-radius: 6px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.04);
}
.user-card-rank.rank-1 {
    background: var(--gradient-btn); color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(249,115,22,0.25);
}
.user-card-rank.rank-2 { background: rgba(100,116,139,0.1); color: #475569; border-color: rgba(100,116,139,0.1); }
.user-card-rank.rank-3 { background: rgba(180,83,9,0.08); color: #b45309; border-color: rgba(180,83,9,0.08); }

.user-card-avatar {
    width: 100%; aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(251,146,60,0.06), rgba(236,72,153,0.03));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 700; color: rgba(249,115,22,0.15);
    overflow: hidden;
}
.user-card-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.user-card-info { padding: 10px 10px 12px; }
.user-card-name {
    font-size: 0.75rem; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-sub { font-size: 0.6rem; color: var(--text3); margin-top: 2px; font-weight: 500; }
.user-card-val {
    font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
    color: var(--accent-dark); margin-top: 4px;
}

@media (max-width: 576px) {
    .user-card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* =====================================================================
   FORMS
   ===================================================================== */
.x-input {
    background: rgba(255,255,255,0.65); color: var(--text);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: var(--radius-sm); padding: 8px 14px;
    font-family: var(--font); font-size: 0.8rem; font-weight: 500;
    outline: none;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.x-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
    background: rgba(255,255,255,0.85);
}
.x-input::placeholder { color: var(--text3); font-weight: 400; }

.x-select {
    appearance: none;
    background: rgba(255,255,255,0.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5' stroke='%238e8aa3' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--text); border: 1px solid rgba(0,0,0,0.07);
    border-radius: var(--radius-sm);
    padding: 8px 32px 8px 14px; font-family: var(--font);
    font-size: 0.8rem; font-weight: 500; cursor: pointer; outline: none;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition);
}
.x-select:focus { border-color: var(--accent); }

/* =====================================================================
   PILLS
   ===================================================================== */
.pill {
    display: inline-flex; font-family: var(--mono);
    font-size: 0.56rem; font-weight: 600; padding: 3px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em;
    border: 1px solid transparent;
}
.pill--gold    { background: var(--accent-subtle); color: var(--accent-dark); border-color: rgba(249,115,22,0.08); }
.pill--cyan    { background: var(--cyan-bg); color: var(--cyan); border-color: rgba(8,145,178,0.08); }
.pill--emerald { background: var(--emerald-bg); color: var(--emerald); border-color: rgba(5,150,105,0.08); }
.pill--rose    { background: var(--rose-bg); color: var(--rose); border-color: rgba(225,29,72,0.08); }

/* =====================================================================
   LOADING / EMPTY
   ===================================================================== */
.loading-indicator {
    display: flex; align-items: center; justify-content: center;
    padding: 28px; color: var(--text3); gap: 8px;
    font-family: var(--mono); font-size: 0.72rem;
}
.spinner-ring {
    width: 18px; height: 18px;
    border: 2px solid rgba(0,0,0,0.06); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 40px 16px; color: var(--text3); }
.empty-state i { font-size: 1.5rem; margin-bottom: 8px; display: block; opacity: 0.3; }
.empty-state p { font-size: 0.8rem; margin: 0; font-weight: 500; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-foot {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    background: rgba(253,252,249,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative; z-index: 1;
}
.foot-inner { display: flex; align-items: center; justify-content: space-between; }
.foot-brand {
    font-family: var(--font-h); font-size: 0.95rem; font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.foot-copy { font-size: 0.72rem; color: var(--text3); font-weight: 500; }

/* =====================================================================
   PROFILE
   ===================================================================== */
.profile-header {
    display: flex; align-items: center; gap: 24px;
    padding: 28px 0; margin-bottom: 8px;
}
.profile-avatar-wrap { flex-shrink: 0; position: relative; }
.profile-avatar-wrap::after {
    content: '';
    position: absolute; inset: -4px;
    border-radius: 50%;
    background: var(--gradient);
    z-index: 0; opacity: 0.45;
    animation: glowPulse 3s ease-in-out infinite;
}
.profile-avatar {
    width: 84px; height: 84px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--bg);
    position: relative; z-index: 1;
}
.profile-avatar-fallback {
    width: 84px; height: 84px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(251,146,60,0.12), rgba(236,72,153,0.08));
    border: 3px solid var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-h); font-size: 2rem; font-weight: 800; color: var(--accent);
    position: relative; z-index: 1;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name {
    font-family: var(--font-h); font-size: 1.6rem; font-weight: 800; margin: 0;
    color: var(--text); letter-spacing: -0.03em;
}
.profile-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.profile-badge {
    font-size: 0.72rem; color: var(--text2);
    display: flex; align-items: center; gap: 5px; font-weight: 500;
}
.profile-badge i { font-size: 0.78rem; color: var(--accent); }

.profile-stats-row {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 24px;
}
.pstat {
    background: var(--bg-card); border: 1px solid var(--border-glass);
    border-radius: var(--radius); padding: 14px 10px; text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.pstat:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.pstat-val { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: var(--accent-dark); }
.pstat-label { font-size: 0.6rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 3px; font-weight: 600; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.pd-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    transition: background var(--transition), padding var(--transition);
}
.pd-item:last-child { border-bottom: none; }
.pd-item:hover { background: rgba(249,115,22,0.025); margin: 0 -16px; padding: 8px 16px; border-radius: 6px; }
.pd-label { font-size: 0.76rem; color: var(--text3); font-weight: 500; }
.pd-val { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--text); }

.profile-sub-head {
    font-size: 0.76rem; font-weight: 700; color: var(--text2);
    margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--border);
    letter-spacing: -0.01em;
}

.profile-links { display: flex; flex-direction: column; gap: 6px; }
.profile-link-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: var(--radius-sm); text-decoration: none;
    color: var(--text); font-size: 0.82rem; font-weight: 600;
    background: rgba(255,255,255,0.45); border: 1px solid var(--border-glass);
    transition: all var(--transition);
    cursor: pointer;
}
.profile-link-item:hover {
    background: var(--accent-subtle); color: var(--accent);
    border-color: rgba(249,115,22,0.12);
    transform: translateX(4px);
    box-shadow: 0 2px 12px rgba(249,115,22,0.06);
}
.profile-link-item i:first-child { font-size: 1rem; color: var(--accent); }
.profile-link-item i:last-child { margin-left: auto; color: var(--text3); font-size: 0.7rem; }
.profile-link-count {
    font-family: var(--mono); font-size: 0.68rem; color: var(--text3);
    margin-left: auto; margin-right: 4px;
}

/* =====================================================================
   UTILITY
   ===================================================================== */
.text-gold    { color: var(--accent) !important; }
.text-cyan    { color: var(--cyan) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-rose    { color: var(--rose) !important; }
.text-muted-x { color: var(--text3) !important; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    .lb-stats { gap: 6px; }
    .lb-stat { min-width: 34px; }
    .lb-stat-value { font-size: 0.65rem; }
    .lb-stat-label { font-size: 0.45rem; }
    .hide-mobile { display: none !important; }
    .main-wrap { padding-top: 66px; padding-bottom: 32px; }
    .profile-header { gap: 16px; }
    .profile-avatar, .profile-avatar-fallback { width: 60px; height: 60px; }
    .profile-avatar-fallback { font-size: 1.4rem; }
    .profile-name { font-size: 1.25rem; }
    .profile-stats-row { grid-template-columns: repeat(3, 1fr); }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-detail-grid { grid-template-columns: 1fr; }
    .stat-trio { grid-template-columns: repeat(3, 1fr); }
    .aurora-orb { filter: blur(70px); opacity: 0.4; }
}
@media (max-width: 576px) {
    .home-grid { gap: 10px; }
    .foot-inner { flex-direction: column; gap: 4px; }
    .container { padding-left: 14px; padding-right: 14px; }
    .page-hero h1 { font-size: 1.5rem; }
    .tweet-search-form .x-input { max-width: none; }
    .stat-number { font-size: 1.5rem; }
    .aurora-orb { transform: scale(0.6); }
}
