/* ============================================
   HIVEX Protocol - Main Styles
   Mobile-First DApp Design System
   ============================================ */

/* CSS Variables - Dark Theme (Crypto Standard) */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-glass: rgba(17, 24, 39, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    --gradient-main: linear-gradient(135deg, #1a237e 0%, #6366f1 50%, #8b5cf6 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
    --gradient-green: linear-gradient(135deg, #10b981, #059669);
    --gradient-glass: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --nav-height: 70px;
    --top-bar-height: 56px;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
}

.splash-hex-grid {
    display: grid;
    grid-template-columns: repeat(3, 24px);
    gap: 4px;
    justify-content: center;
    margin-bottom: 24px;
}

.hex {
    width: 24px; height: 24px;
    background: rgba(99, 102, 241, 0.15);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: hexPulse 2s infinite;
}

.hex.active {
    background: var(--accent-purple);
    animation: hexGlow 1.5s infinite;
}

.hex:nth-child(2) { animation-delay: 0.1s; }
.hex:nth-child(3) { animation-delay: 0.2s; }
.hex:nth-child(4) { animation-delay: 0.3s; }
.hex:nth-child(6) { animation-delay: 0.15s; }
.hex:nth-child(7) { animation-delay: 0.25s; }
.hex:nth-child(8) { animation-delay: 0.35s; }
.hex:nth-child(9) { animation-delay: 0.4s; }

.splash-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 8px;
    margin-bottom: 4px;
}

.splash-subtitle {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    letter-spacing: 12px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.splash-loader {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-main);
    border-radius: 2px;
    animation: loadProgress 2.5s ease-in-out forwards;
}

.splash-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    animation: textFlicker 1.5s infinite;
}

/* App Container */
.app-container {
    width: 100%;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background: var(--bg-primary);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--top-bar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 100;
}

.logo-mini {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-hex {
    font-size: 1.2rem;
    color: var(--accent-purple);
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.network-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
}

.status-dot {
    width: 6px; height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
}

.status-dot.pulse {
    animation: pulse 2s infinite;
}

.network-label {
    font-size: 0.65rem;
    color: var(--accent-green);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.top-bar-right {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 36px; height: 36px;
    border: none;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:active {
    transform: scale(0.92);
    background: rgba(255,255,255,0.1);
}

.badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 16px; height: 16px;
    background: var(--accent-red);
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    padding-top: calc(var(--top-bar-height) + 8px);
    padding-bottom: calc(var(--nav-height) + 20px);
    padding-left: 16px;
    padding-right: 16px;
    min-height: 100vh;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Glass Card */
.card {
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-card);
}

/* Wallet Summary */
.wallet-summary {
    padding: 20px;
    background: var(--gradient-glass);
    border: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

.wallet-summary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.wallet-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wallet-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-sm {
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}

.wallet-balance {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.balance-dollar {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    vertical-align: top;
}

.wallet-change {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.wallet-change.positive {
    color: var(--accent-green);
}

.wallet-change.negative {
    color: var(--accent-red);
}

.wallet-tokens {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.token-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    font-size: 0.75rem;
}

.token-name {
    color: var(--accent-purple);
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
}

.token-val {
    color: var(--text-primary);
    font-weight: 600;
}

/* Cat Status Card */
.cat-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-status-card:active {
    transform: scale(0.98);
}

.cat-status-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cat-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cat-avatar.elite {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.cat-emoji {
    font-size: 1.5rem;
}

.cat-level-badge {
    position: absolute;
    bottom: -4px;
    font-size: 0.55rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
    background: var(--gradient-gold);
    color: #000;
}

.cat-info {
    flex: 1;
}

.cat-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cat-stats {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cat-stats i {
    margin-right: 3px;
    color: var(--accent-gold);
}

.cat-exp-bar {
    height: 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 7px;
    position: relative;
    overflow: hidden;
}

.exp-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 7px;
    transition: width 1s ease;
}

.exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.cat-status-right {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 12px;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h2 i {
    color: var(--accent-purple);
    font-size: 0.85rem;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-dot {
    width: 6px; height: 6px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.count-badge {
    background: var(--accent-purple);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px;
}

/* Hunting Arena - Canvas */
.hunting-arena-wrapper {
    border-radius: var(--radius-lg);
    background: rgba(10, 14, 26, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.18);
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
    box-shadow: 0 0 24px rgba(99,102,241,0.08), inset 0 0 20px rgba(0,0,0,0.3);
}

.hunting-arena-wrapper canvas {
    display: block;
    width: 100%;
    min-height: 380px;
    border-radius: var(--radius-lg);
}

/* Chase Progress List */
.chase-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chase-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
    animation: slideInLeft 0.4s ease;
}

.chase-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
}
.chase-card.grey::before { background: #94a3b8; }
.chase-card.silver::before { background: #c0c0c0; }
.chase-card.gold::before { background: #f59e0b; }
.chase-card.king::before { background: #ef4444; }
.chase-card.emperor::before { background: #7B4A8E; }

.chase-card .chase-mouse-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    position: relative;
}

.chase-mouse-icon.grey { background: rgba(148,163,184,0.1); }
.chase-mouse-icon.silver { background: rgba(192,192,192,0.1); }
.chase-mouse-icon.gold { background: rgba(245,158,11,0.1); }
.chase-mouse-icon.king { background: rgba(239,68,68,0.1); }
.chase-mouse-icon.emperor { background: rgba(106,61,125,0.15); }

.chase-card .chase-info {
    flex: 1;
    min-width: 0;
}

.chase-pair {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chase-pair .chase-type-badge {
    font-size: 0.55rem;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
    background: rgba(139,92,246,0.15);
    color: var(--accent-purple);
}

.chase-source {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Chase progress bar */
.chase-progress-bar {
    height: 18px;
    background: rgba(255,255,255,0.05);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.chase-progress-fill {
    height: 100%;
    border-radius: 9px;
    transition: width 0.3s linear;
    position: relative;
    overflow: hidden;
}

.chase-progress-fill.grey { background: linear-gradient(90deg, #64748b, #94a3b8); }
.chase-progress-fill.silver { background: linear-gradient(90deg, #9ca3af, #e5e7eb); }
.chase-progress-fill.gold { background: linear-gradient(90deg, #d97706, #fbbf24); }
.chase-progress-fill.king { background: linear-gradient(90deg, #dc2626, #f87171); }
.chase-progress-fill.emperor { background: linear-gradient(90deg, #6A3D7D, #B088C0); }

/* Animated stripe on progress bar */
.chase-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.15) 50%,
        transparent 100%
    );
    animation: progressShine 1.5s infinite;
}

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

.chase-progress-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.55rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    white-space: nowrap;
    z-index: 1;
}

/* Chase bar info row (pct / time / ttl) */
.chase-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.chase-bar-info .chase-pct {
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
}

.chase-bar-info .chase-time-left {
    color: var(--accent-gold);
    font-weight: 600;
}

.chase-bar-info .chase-ttl {
    color: var(--text-muted);
    font-size: 0.55rem;
}

.chase-bar-info .chase-ttl.urgent {
    color: var(--accent-red);
    font-weight: 600;
}

.chase-spread {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
}

.chase-duration {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-align: right;
}

.chase-card .chase-meta {
    flex-shrink: 0;
    text-align: right;
}

.chase-profit-est {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 2px;
}

.chase-timer {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: flex-end;
}

.chase-timer.urgent { color: var(--accent-red); }

.chase-cat-icon {
    position: absolute;
    font-size: 0.75rem;
    top: -1px;
    transition: left 0.3s linear;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Capture Feed */
.capture-feed {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.capture-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    animation: slideInLeft 0.3s ease;
}

.capture-item .cap-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.capture-item .cap-info {
    flex: 1;
    min-width: 0;
}

.cap-pair {
    font-size: 0.75rem;
    font-weight: 600;
}

.cap-detail {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.capture-item .cap-profit {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-green);
    flex-shrink: 0;
}

.cap-time {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-align: right;
}

/* Hunt Event Cards */
.hunt-event {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
    animation: slideInLeft 0.4s ease;
}

.hunt-event:last-child {
    border-bottom: none;
}

.hunt-event .mouse-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mouse-icon.grey { background: rgba(148,163,184,0.15); }
.mouse-icon.silver { background: rgba(192,192,192,0.15); border: 1px solid rgba(192,192,192,0.3); }
.mouse-icon.gold { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); }
.mouse-icon.king { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); }
.mouse-icon.emperor { background: rgba(106,61,125,0.15); border: 1px solid rgba(106,61,125,0.3); }

.hunt-info {
    flex: 1;
    min-width: 0;
}

.hunt-pair {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hunt-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.hunt-result {
    text-align: right;
    flex-shrink: 0;
}

.hunt-profit {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-green);
    font-family: 'Orbitron', monospace;
}

.hunt-time {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.hunt-status {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.hunt-status.captured {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.hunt-status.hunting {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
    animation: blink 1s infinite;
}

.hunt-status.expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Market Ticker */
.market-ticker {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.market-ticker::-webkit-scrollbar {
    display: none;
}

.market-card {
    min-width: 140px;
    flex-shrink: 0;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
}

.market-card .mc-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.mc-icon {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.mc-symbol {
    font-size: 0.8rem;
    font-weight: 700;
}

.mc-price {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.mc-change {
    font-size: 0.7rem;
    font-weight: 600;
}

.mc-change.up { color: var(--accent-green); }
.mc-change.down { color: var(--accent-red); }

/* Mice List */
.mice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mouse-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.mouse-card:active {
    transform: scale(0.98);
}

.mouse-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
}

.mouse-card.grey::before { background: #94a3b8; }
.mouse-card.silver::before { background: #c0c0c0; }
.mouse-card.gold::before { background: #f59e0b; }
.mouse-card.king::before { background: #ef4444; }
.mouse-card.emperor::before { background: #7B4A8E; }

.mouse-card .m-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.m-icon.grey { background: rgba(148,163,184,0.1); }
.m-icon.silver { background: rgba(192,192,192,0.1); }
.m-icon.gold { background: rgba(245,158,11,0.1); }
.m-icon.king { background: rgba(239,68,68,0.1); }
.m-icon.emperor { background: rgba(106,61,125,0.15); }

.mouse-card .m-info {
    flex: 1;
    min-width: 0;
}

.m-pair {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.m-source {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.m-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.m-timer i {
    font-size: 0.6rem;
}

.m-timer.urgent {
    color: var(--accent-red);
}

.m-timer.normal {
    color: var(--accent-gold);
}

.mouse-card .m-value {
    text-align: right;
    flex-shrink: 0;
}

.m-profit {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 2px;
}

.m-spread {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-card {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    text-align: center;
}

.stat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 0.9rem;
}

.stat-icon.grey-mouse { background: rgba(148,163,184,0.15); color: #94a3b8; }
.stat-icon.silver-mouse { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.stat-icon.gold-mouse { background: rgba(245,158,11,0.15); color: #f59e0b; }
.stat-icon.king-mouse { background: rgba(245,200,66,0.15); color: #F5C842; }
.stat-icon.emperor-mouse { background: rgba(106,61,125,0.15); color: #7B4A8E; }
.stat-icon.total-earn { background: rgba(16,185,129,0.15); color: #10b981; }

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ============ VAULTS PAGE ============ */
.page-title {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 8px;
}

.page-title h1 {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.page-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.vault-total-tvl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--gradient-glass);
    border: 1px solid rgba(99, 102, 241, 0.15);
    margin-bottom: 16px;
}

.tvl-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tvl-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-green);
}

.vaults-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vault-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
}

.vault-card .vc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.vc-name-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vc-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.vc-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.vc-type {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.vc-apy {
    text-align: right;
}

.vc-apy-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vc-apy-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-green);
}

.vc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.vc-stat {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.vc-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.vc-stat-value {
    font-size: 0.8rem;
    font-weight: 700;
}

.vc-bar {
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.vc-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

/* ============ CAT PAGE ============ */
.cat-profile-card {
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
}

.cat-big-avatar {
    width: 100px; height: 100px;
    margin: 0 auto 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.cat-big-avatar.elite {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(217,119,6,0.1));
    border: 2px solid rgba(245,158,11,0.4);
    box-shadow: 0 0 30px rgba(245,158,11,0.2);
}

.cat-profile-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.cat-profile-type {
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 16px;
}

.cat-attrs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.cat-attr {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    text-align: center;
}

.cat-attr-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cat-attr-value {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
}

.cat-food-bar {
    margin-top: 12px;
}

.food-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.75rem;
}

.food-bar-track {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.food-bar-fill {
    height: 100%;
    background: var(--gradient-green);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Hunt History */
.cat-hunt-history {
    margin-top: 16px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    margin-bottom: 8px;
}

/* ============ AGENTS PAGE ============ */
.agent-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agent-dept {
    margin-bottom: 8px;
}

.dept-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.dept-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.dept-name {
    font-size: 0.85rem;
    font-weight: 700;
    flex: 1;
}

.dept-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 8px;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.agent-cell {
    padding: 10px 8px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    text-align: center;
    font-size: 0.65rem;
    position: relative;
}

.agent-cell .agent-id {
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.agent-cell .agent-name {
    font-weight: 600;
    font-size: 0.7rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-cell .agent-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.agent-status-dot.active { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.agent-status-dot.busy { background: var(--accent-gold); box-shadow: 0 0 6px var(--accent-gold); }
.agent-status-dot.idle { background: var(--text-muted); }

.agent-cell .agent-load {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.agent-cell:active {
    transform: scale(0.94);
    background: rgba(139,92,246,0.1);
}

/* ============ AGENT DETAIL MODAL ============ */
.agent-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.agent-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.agent-modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    animation: slideInUp 0.35s ease;
}
.agent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-glass);
}
.agent-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.agent-modal-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.agent-modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.agent-detail-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.agent-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.agent-section {
    margin-bottom: 16px;
}
.agent-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.agent-section-title i {
    font-size: 0.75rem;
}

/* Steps */
.agent-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.agent-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    transition: all 0.3s;
}
.agent-step.running {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.25);
}
.agent-step.done {
    opacity: 0.65;
}
.step-indicator {
    width: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}
.step-spinner {
    width: 14px; height: 14px;
    border: 2px solid var(--accent-purple);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.step-info { flex: 1; }
.step-name {
    font-size: 0.75rem;
    font-weight: 600;
}
.step-dur {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
}

/* Compute bars */
.agent-compute-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.compute-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.compute-label {
    width: 32px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
}
.compute-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}
.compute-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.compute-val {
    width: 40px;
    text-align: right;
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

/* Result */
.agent-result-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px;
}
.result-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}
.result-prompt {
    color: var(--accent-green);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.8rem;
}
.result-text {
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}
.result-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-glass);
    padding-top: 8px;
}

/* Token cost */
.agent-token-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}
.token-cost-card {
    text-align: center;
    padding: 10px 6px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}
.tc-value {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.tc-label {
    font-size: 0.55rem;
    color: var(--text-muted);
}
.token-cost-note {
    font-size: 0.6rem;
    color: var(--text-muted);
    padding: 8px 10px;
    background: rgba(245,158,11,0.06);
    border-radius: 6px;
    border: 1px solid rgba(245,158,11,0.12);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}
.token-cost-note i {
    color: var(--accent-gold);
    margin-top: 1px;
}

/* ============ TOKENS PAGE ============ */
.token-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.token-big-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
}

.token-big-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.token-big-card.hvx::before { background: var(--accent-purple); }
.token-big-card.hive::before { background: var(--accent-gold); }
.token-big-card.cell::before { background: var(--accent-cyan); }

.tb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.tb-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    font-size: 0.7rem;
}

.tb-icon.hvx { background: rgba(139,92,246,0.2); color: var(--accent-purple); }
.tb-icon.hive { background: rgba(245,158,11,0.2); color: var(--accent-gold); }
.tb-icon.cell { background: rgba(6,182,212,0.2); color: var(--accent-cyan); }

.tb-name {
    font-size: 1rem;
    font-weight: 700;
}

.tb-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.tb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.tb-price {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 800;
}

.tb-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.tb-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tb-stat {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.tb-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.tb-stat-value {
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
    min-width: 50px;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 1.1rem;
    transition: all 0.2s;
}

.nav-item.active {
    color: var(--accent-purple);
}

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item.hunt-btn {
    position: relative;
    top: -12px;
}

.hunt-btn-inner {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    color: white;
    font-size: 1.2rem;
    animation: huntBtnPulse 3s infinite;
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 0; right: -100%;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: var(--bg-secondary);
    z-index: 200;
    transition: right 0.3s ease;
    padding: 20px;
}

.notification-panel.open {
    right: 0;
    left: 50%;
    transform: translateX(-50%);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.notif-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    margin-bottom: 8px;
    border: 1px solid var(--border-glass);
}

.notif-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.notif-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.notif-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Capture Toast */
.capture-toast {
    position: fixed;
    top: calc(var(--top-bar-height) + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    width: calc(100% - 32px);
    max-width: 448px;
    padding: 14px 18px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 300;
    transition: transform 0.4s ease;
}

.capture-toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-emoji {
    font-size: 1.5rem;
}

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-green);
}

.toast-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

/* ============ TAB BAR SYSTEM ============ */
.tab-bar {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.tab-btn:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.tab-btn.active {
    color: #fff;
    background: rgba(99,102,241,0.25);
    box-shadow: 0 0 8px rgba(99,102,241,0.15);
}
.tab-btn .tab-count {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 0.55rem;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-left: 4px;
    padding: 0 4px;
}
.tab-btn.active .tab-count {
    background: rgba(99,102,241,0.4);
}

/* ============ ANALYTICS PANEL ============ */
.analytics-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 12px;
}
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.anl-card {
    text-align: center;
    padding: 10px 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.04);
}
.anl-icon {
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.anl-val {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}
.anl-label {
    font-size: 0.58rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.anl-coverage {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cov-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
}
.cov-name {
    min-width: 70px;
    color: var(--text-secondary);
    font-weight: 500;
}
.cov-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}
.cov-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}
.cov-pct {
    min-width: 32px;
    text-align: right;
    font-family: 'Orbitron', monospace;
    font-size: 0.58rem;
    color: var(--text-muted);
}
.cov-status {
    font-size: 5px;
}

/* ============ PIPELINE EVENT FEED ============ */
.pipeline-feed {
    background: rgba(10,10,30,0.6);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-lg);
    padding: 10px;
    max-height: 320px;
    overflow-y: auto;
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 0.65rem;
    line-height: 1.6;
}
.pipeline-feed::-webkit-scrollbar { width: 2px; }
.pipeline-feed::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 1px; }
.pipe-event {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    display: flex;
    gap: 6px;
    align-items: flex-start;
}
.pipe-event:last-child { border-bottom: none; }
.pipe-time {
    color: rgba(255,255,255,0.2);
    font-size: 0.55rem;
    min-width: 52px;
    flex-shrink: 0;
}
.pipe-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}
.pipe-body {
    flex: 1;
    min-width: 0;
}
.pipe-cmd {
    color: #a78bfa;
    font-weight: 600;
}
.pipe-result {
    color: #10b981;
}
.pipe-trigger {
    color: #f59e0b;
    font-style: italic;
}
.pipe-error {
    color: #ef4444;
}
.pipe-sys {
    color: rgba(255,255,255,0.3);
}
.pipe-agent {
    display: inline-block;
    padding: 0 4px;
    background: rgba(99,102,241,0.15);
    border-radius: 3px;
    color: #818cf8;
    font-size: 0.6rem;
    font-weight: 600;
}
.pipe-profit {
    color: #10b981;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}
.pipe-cell {
    color: #f59e0b;
    font-size: 0.58rem;
}
.pipe-separator {
    text-align: center;
    color: rgba(99,102,241,0.3);
    font-size: 0.55rem;
    padding: 2px 0;
    border-bottom: 1px dashed rgba(99,102,241,0.1);
}

/* ============ ENHANCED CHASE CARD with Agent info ============ */
.chase-card .chase-agents {
    display: flex;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.chase-agent-tag {
    font-size: 0.5rem;
    padding: 1px 4px;
    background: rgba(99,102,241,0.12);
    border-radius: 3px;
    color: #a78bfa;
    font-family: 'Courier New', monospace;
}
.chase-card .chase-contract {
    font-size: 0.55rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: 'Courier New', monospace;
}

/* ============ ENHANCED MOUSE CARD with Agent & Contract info ============ */
.mouse-card .m-contract {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    margin-top: 2px;
}
.mouse-card .m-agents {
    display: flex;
    gap: 3px;
    margin-top: 3px;
    flex-wrap: wrap;
}
.mouse-card .m-agent-tag {
    font-size: 0.5rem;
    padding: 1px 4px;
    background: rgba(99,102,241,0.1);
    border-radius: 3px;
    color: #818cf8;
    font-family: 'Courier New', monospace;
}

/* ============ SETTINGS PAGE ============ */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 16px;
}

.settings-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.setting-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.setting-btn:active {
    background: rgba(139,92,246,0.2);
    border-color: var(--accent-purple);
    transform: scale(0.92);
}

.setting-value {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-cyan);
    min-width: 36px;
    text-align: center;
}

.setting-hint {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: -4px;
    padding-bottom: 8px;
}

/* Exchange Cards */
.exchange-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exchange-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    padding: 14px;
    background: rgba(255,255,255,0.02);
    transition: all 0.2s;
}

.exchange-card.enabled {
    border-color: rgba(16,185,129,0.25);
    background: rgba(16,185,129,0.04);
}

.exchange-card.disabled {
    opacity: 0.6;
}

.ex-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ex-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ex-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.ex-type {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(139,92,246,0.15);
    color: var(--accent-purple);
}

.ex-endpoint, .ex-key {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ex-endpoint i, .ex-key i {
    color: var(--text-muted);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.ex-input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text-primary);
    font-size: 0.72rem;
    font-family: 'Inter', monospace;
    outline: none;
    transition: border-color 0.2s;
}

.ex-input:focus {
    border-color: var(--accent-purple);
}

.ex-input::placeholder {
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* Add Exchange Button */
.btn-add-exchange {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-exchange:active {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

/* Settings Action Button */
.settings-action-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(239,68,68,0.25);
    background: rgba(239,68,68,0.08);
    color: var(--accent-red);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.settings-action-btn:active {
    background: rgba(239,68,68,0.2);
    transform: scale(0.98);
}

/* ============ TERMINAL-STYLE AGENT PANEL ============ */
.terminal-modal {
    background: #0c0c0c !important;
    font-family: 'JetBrains Mono', 'Fira Code', 'Menlo', monospace;
    padding: 0 !important;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    gap: 10px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}

.terminal-dots .dot.red { background: #ff5f56; }
.terminal-dots .dot.yellow { background: #ffbd2e; }
.terminal-dots .dot.green { background: #27c93f; }

.terminal-title {
    font-size: 0.7rem;
    color: #999;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-info-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    background: #111;
    border-bottom: 1px solid #222;
    font-size: 0.65rem;
    color: #888;
    flex-wrap: wrap;
}

.terminal-info-bar i {
    margin-right: 3px;
}

.terminal-body {
    min-height: 300px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 12px 16px;
    background: #0c0c0c;
    font-size: 0.72rem;
    line-height: 1.65;
}

.terminal-line {
    white-space: pre-wrap;
    word-break: break-all;
    animation: termFadeIn 0.2s ease;
}

@keyframes termFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.terminal-line .tl-time {
    color: #555;
    font-size: 0.6rem;
    margin-right: 8px;
}

.terminal-line.sys { color: #888; }
.terminal-line.cmd { color: #27c93f; }
.terminal-line.info { color: #3b82f6; }
.terminal-line.step { color: #f59e0b; }
.terminal-line.dots { color: #666; }
.terminal-line.ok { color: #10b981; }
.terminal-line.result { color: #06b6d4; font-weight: 700; }
.terminal-line.cost { color: #f59e0b; }
.terminal-line.event { color: #8b5cf6; }
.terminal-line.error { color: #ef4444; }
.terminal-line.next-event { color: #ec4899; font-weight: 600; }

.terminal-stats {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    background: #111;
    border-top: 1px solid #222;
    font-size: 0.65rem;
    color: #888;
    flex-wrap: wrap;
}

.terminal-stats i {
    margin-right: 3px;
}

/* Pipeline step visual connector in terminal */
.terminal-line.step::before {
    content: '┌';
    color: #555;
    margin-right: 4px;
}

.terminal-line.dots::before {
    content: '│';
    color: #444;
    margin-right: 4px;
}

.terminal-line.ok::before {
    content: '└';
    color: #555;
    margin-right: 4px;
}

.terminal-line.next-event::before {
    content: '⟹ ';
    color: #ec4899;
}

/* ============ PAGE TITLE ============ */
.page-title {
    margin-bottom: 20px;
}

.page-title h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* History Items */
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-glass);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes hexPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

@keyframes hexGlow {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 8px rgba(139, 92, 246, 0.3); }
    50% { opacity: 1; box-shadow: 0 0 16px rgba(139, 92, 246, 0.6); }
}

@keyframes loadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes textFlicker {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes huntBtnPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(99, 102, 241, 0.7); }
}

.refresh-spin {
    animation: spin 0.8s linear !important;
}

.page-enter {
    animation: fadeIn 0.3s ease;
}

/* ============ HUNT MODE TABS ============ */
.hunt-mode-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.hunt-mode-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.hunt-mode-btn:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
}

.hunt-mode-btn.active {
    color: #fff;
    background: rgba(99,102,241,0.22);
    box-shadow: 0 0 12px rgba(99,102,241,0.2), inset 0 0 12px rgba(99,102,241,0.06);
}

.hunt-mode-btn i {
    font-size: 0.85rem;
}

.hot-badge {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    animation: hotPulse 2s ease-in-out infinite;
    line-height: 1.3;
}

@keyframes hotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Hunt Arena Panels */
.hunt-arena-panel {
    display: none;
}

.hunt-arena-panel.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

/* ============ COMMUNITY HUNT STYLES ============ */
.community-hunt-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comm-arena {
    border-color: rgba(139,92,246,0.2) !important;
    box-shadow: 0 0 28px rgba(139,92,246,0.1), inset 0 0 20px rgba(0,0,0,0.3) !important;
}

.comm-arena canvas {
    min-height: 420px !important;
}

/* Community Dashboard */
.comm-dashboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Stats Bar */
.comm-stats-bar {
    display: flex;
    gap: 4px;
    padding: 10px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow-x: auto;
    scrollbar-width: none;
}

.comm-stats-bar::-webkit-scrollbar { display: none; }

.comm-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 65px;
    padding: 4px 6px;
    border-radius: 8px;
}

.comm-stat.highlight {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.15);
}

.comm-stat-icon {
    font-size: 0.85rem;
}

.comm-stat-val {
    font-family: 'Orbitron', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.comm-stat.highlight .comm-stat-val {
    color: var(--accent-green);
}

.comm-stat-label {
    font-size: 0.58rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Two-column panels */
.comm-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.comm-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comm-panel-header {
    padding: 8px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comm-panel-header i {
    font-size: 0.7rem;
    color: var(--accent-gold);
}

/* Leaderboard rows */
.comm-leaderboard {
    padding: 6px 10px;
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 0.68rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.lb-row.top {
    padding: 5px 0;
}

.lb-rank {
    width: 18px;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.lb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lb-name {
    flex: 1;
    color: var(--text-secondary);
    font-weight: 500;
}

.lb-row.top .lb-name {
    color: var(--text-primary);
    font-weight: 700;
}

.lb-earn {
    color: var(--accent-green);
    font-family: 'Orbitron', monospace;
    font-size: 0.62rem;
    font-weight: 600;
}

.lb-count {
    color: var(--text-muted);
    font-size: 0.58rem;
    min-width: 24px;
    text-align: right;
}

/* Feed rows */
.comm-feed {
    padding: 6px 10px;
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.feed-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 0;
    font-size: 0.62rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.feed-emoji {
    font-size: 0.75rem;
}

.feed-cats {
    color: var(--text-muted);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-coop {
    display: inline-block;
    font-size: 0.52rem;
    font-weight: 600;
    color: var(--accent-purple);
    background: rgba(139,92,246,0.12);
    padding: 1px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}

.feed-profit {
    color: var(--accent-green);
    font-family: 'Orbitron', monospace;
    font-size: 0.58rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Team bar */
.comm-team-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

.comm-team-avatars {
    display: flex;
    gap: 4px;
}

.comm-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cat-color, #666);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 8px color-mix(in srgb, var(--cat-color, #666) 30%, transparent);
    transition: transform 0.2s;
}

.comm-avatar:hover {
    transform: scale(1.15);
}

.comm-status-text {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pulse-dot.green {
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
}

/* Scrollbar styling for community panels */
.comm-leaderboard::-webkit-scrollbar,
.comm-feed::-webkit-scrollbar {
    width: 3px;
}

.comm-leaderboard::-webkit-scrollbar-track,
.comm-feed::-webkit-scrollbar-track {
    background: transparent;
}

.comm-leaderboard::-webkit-scrollbar-thumb,
.comm-feed::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}

/* Mobile adjustments for community */
@media (max-width: 400px) {
    .comm-panels {
        grid-template-columns: 1fr;
    }
    
    .comm-stats-bar {
        flex-wrap: wrap;
    }
    
    .comm-stat {
        min-width: 55px;
    }
    
    .comm-team-bar {
        flex-direction: column;
        gap: 6px;
    }
}

/* ============================================================
   ONBOARDING / NEW USER GUIDE
   ============================================================ */

/* Overlay */
.ob-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}
.ob-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
.ob-overlay.ob-fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Backdrop — only for fullscreen steps; hidden during spotlight */
.ob-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 18, .78);
    transition: all .4s;
}
.ob-backdrop.has-spotlight {
    /* Hide entirely — spotlight box-shadow provides its own mask */
    background: transparent;
    pointer-events: none;
}

/* Spotlight hole — the ONLY dark mask during spotlight steps */
.ob-spotlight-hole {
    display: none;
    position: fixed;
    box-shadow: 0 0 0 9999px rgba(5, 8, 18, .72);
    border: 2px solid rgba(139,92,246,.7);
    z-index: 10001;
    transition: all .4s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    animation: ob-spotlight-pulse 2s ease-in-out infinite;
    /* Subtle inner glow to brighten highlighted area slightly */
    background: rgba(139,92,246,.04);
}
@keyframes ob-spotlight-pulse {
    0%, 100% { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 9999px rgba(5, 8, 18, .72), 0 0 20px rgba(139,92,246,.15); }
    50% { border-color: rgba(139,92,246,1); box-shadow: 0 0 0 9999px rgba(5, 8, 18, .72), 0 0 30px rgba(139,92,246,.3); }
}

/* Progress Bar */
.ob-progress-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,.06);
    z-index: 10005;
}
.ob-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    transition: width .5s cubic-bezier(.4,0,.2,1);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 8px rgba(139,92,246,.5);
}

/* Card wrapper */
.ob-card-wrap {
    position: fixed;
    z-index: 10003;
}
.ob-card-wrap.ob-fullscreen {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ob-card-wrap.ob-tooltip {
    position: fixed;
}

/* Card base */
.ob-card {
    background: linear-gradient(145deg, rgba(22,28,45,.96), rgba(15,19,32,.97));
    border: 1px solid rgba(139,92,246,.3);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(.97);
    opacity: 0;
    transition: all .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 0 40px rgba(139,92,246,.12);
}
.ob-card.ob-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.ob-card.ob-exit {
    transform: translateY(-20px) scale(.97);
    opacity: 0;
}

/* Fullscreen card */
.ob-card-full {
    width: 100%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.ob-card-body {
    padding: 30px 24px 16px;
    text-align: center;
}

/* Tooltip card */
.ob-card-tip {
    position: relative;
    padding: 16px 18px 12px;
    max-width: 100%;
}
.ob-tip-arrow {
    position: absolute;
    width: 12px; height: 12px;
    background: linear-gradient(145deg, rgba(22,28,45,.96), rgba(15,19,32,.97));
    border: 1px solid rgba(139,92,246,.3);
    transform: rotate(45deg);
    left: 40px;
}
.ob-tip-arrow.arrow-top {
    top: -7px;
    border-right: none; border-bottom: none;
}
.ob-tip-arrow.arrow-bottom {
    bottom: -7px;
    border-left: none; border-top: none;
}
.ob-tip-title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.ob-tip-desc {
    font-size: .78rem;
    color: #c8d1dc;
    line-height: 1.7;
}
.ob-tip-desc strong {
    color: #e0d4ff;
    font-weight: 700;
}

/* Card footer */
.ob-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 16px;
    gap: 10px;
}
.ob-card-tip .ob-card-footer {
    padding: 10px 0 0;
}

/* Step dots */
.ob-step-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.ob-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    transition: all .3s;
}
.ob-dot.active {
    width: 18px;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}
.ob-dot.done {
    background: rgba(99,102,241,.4);
}

/* Buttons */
.ob-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
}
.ob-btn-sm {
    padding: 8px 14px;
    font-size: .75rem;
}
.ob-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
}
.ob-btn-primary:active {
    transform: scale(.96);
    box-shadow: 0 2px 8px rgba(99,102,241,.4);
}
.ob-btn-ghost {
    background: rgba(255,255,255,.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,.08);
}
.ob-btn-ghost:active {
    background: rgba(255,255,255,.1);
}
.ob-btn-glow {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16,185,129,.4);
    font-size: .9rem;
    padding: 12px 28px;
    animation: ob-glow-btn 2s ease-in-out infinite;
}
@keyframes ob-glow-btn {
    0%, 100% { box-shadow: 0 4px 20px rgba(16,185,129,.4); }
    50% { box-shadow: 0 4px 30px rgba(16,185,129,.65); }
}
.ob-btn-glow:active { transform: scale(.96); }

/* Skip */
.ob-skip {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .68rem;
    cursor: pointer;
    opacity: .6;
    transition: opacity .2s;
    font-family: 'Inter', sans-serif;
}
.ob-skip:hover { opacity: 1; }

/* ═══ STEP-SPECIFIC STYLES ═══ */

/* Welcome */
.ob-welcome-logo { margin-bottom: 16px; }
.ob-hex-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(139,92,246,.15));
    border: 2px solid rgba(99,102,241,.35);
    animation: ob-hex-spin 6s linear infinite;
}
.ob-hex-ring span {
    font-size: 2rem;
    color: #818cf8;
}
@keyframes ob-hex-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.ob-welcome-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}
.ob-welcome-sub {
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.ob-welcome-desc {
    font-size: .8rem;
    color: #c8d1dc;
    line-height: 1.7;
    margin-bottom: 18px;
}
.ob-welcome-desc strong { color: #e0d4ff; font-weight: 700; }
.ob-feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.ob-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: .68rem;
    font-weight: 600;
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 20px;
    color: #a5b4fc;
}
.ob-pill i { font-size: .65rem; }

/* Sim Notice */
.ob-sim-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(251,191,36,.15), rgba(245,158,11,.15));
    border: 1px solid rgba(251,191,36,.3);
    color: #fbbf24;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.ob-sim-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
}
.ob-sim-desc {
    font-size: .8rem;
    color: #c8d1dc;
    line-height: 1.7;
    margin-bottom: 18px;
}
.ob-sim-desc strong { color: #fcd34d; font-weight: 700; }
.ob-sim-gift { margin: 0 auto; max-width: 320px; }
.ob-gift-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(16,185,129,.06);
    border: 1px solid rgba(16,185,129,.2);
    border-radius: 14px;
    text-align: left;
}
.ob-gift-icon { font-size: 2rem; flex-shrink: 0; }
.ob-gift-title {
    font-size: .85rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 8px;
}
.ob-gift-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: .72rem;
    color: #c8d1dc;
}
.ob-gift-tag {
    display: inline-block;
    font-size: .62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
    color: var(--text-primary);
    margin-right: 4px;
}
.ob-gift-tag.queen {
    background: linear-gradient(135deg, rgba(239,68,68,.2), rgba(245,158,11,.2));
    color: #fbbf24;
    border: 1px solid rgba(239,68,68,.25);
}

/* Cat Showcase */
.ob-cat-showcase { margin-bottom: 16px; position: relative; }
.ob-cat-avatar-wrap {
    position: relative;
    display: inline-block;
    width: 88px; height: 88px;
    margin-bottom: 10px;
}
.ob-cat-img {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 3px solid rgba(239,68,68,.5);
    box-shadow: 0 0 24px rgba(239,68,68,.2);
    object-fit: cover;
}
.ob-cat-crown {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    animation: ob-crown-bob 2s ease-in-out infinite;
}
@keyframes ob-crown-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px); }
}
.ob-cat-sparkles {
    position: absolute;
    inset: -12px;
}
.ob-cat-sparkles span {
    position: absolute;
    font-size: .7rem;
    animation: ob-sparkle-orbit 3s linear infinite;
    animation-delay: calc(var(--i) * .75s);
}
@keyframes ob-sparkle-orbit {
    0% { top: 50%; left: -8px; opacity: 0; }
    20% { opacity: 1; }
    50% { top: -8px; left: 50%; }
    80% { opacity: 1; }
    100% { top: 50%; left: calc(100% + 8px); opacity: 0; }
}
.ob-cat-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}
.ob-cat-type {
    font-size: .75rem;
    color: #ef4444;
    font-weight: 700;
    margin-bottom: 4px;
}
.ob-cat-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 14px 0;
    padding: 0 8px;
}
.ob-cs {
    text-align: center;
    padding: 8px 4px;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.05);
}
.ob-cs-val {
    font-family: 'Orbitron', monospace;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.ob-cs-label {
    font-size: .58rem;
    color: var(--text-muted);
}
.ob-cat-desc {
    font-size: .75rem;
    color: #c8d1dc;
    line-height: 1.6;
}
.ob-cat-desc strong { color: #fcd34d; font-weight: 700; }

/* Mice intro */
.ob-mice-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.ob-mice-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.ob-mouse-card {
    text-align: center;
    padding: 10px 4px 8px;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.06);
    transition: transform .2s;
}
.ob-mouse-card:hover { transform: translateY(-2px); }
.ob-mouse-emoji { font-size: 1.3rem; margin-bottom: 4px; }
.ob-mouse-name {
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}
.ob-mouse-profit {
    font-size: .55rem;
    font-family: 'Orbitron', monospace;
    color: var(--mc, #999);
    font-weight: 600;
    margin-bottom: 2px;
}
.ob-mouse-type {
    font-size: .52rem;
    color: var(--text-muted);
}
.ob-mice-note {
    font-size: .7rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Done screen */
.ob-done-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: ob-rocket 2s ease-in-out infinite;
}
@keyframes ob-rocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(-2deg); }
    75% { transform: translateY(-3px) rotate(2deg); }
}
.ob-done-title {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
}
.ob-done-desc {
    font-size: .8rem;
    color: #c8d1dc;
    line-height: 1.7;
    margin-bottom: 18px;
}
.ob-done-desc strong { color: #34d399; font-weight: 700; }
.ob-done-tips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    padding: 0 16px;
    margin-bottom: 16px;
}
.ob-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    color: #c8d1dc;
    line-height: 1.5;
}
.ob-tip strong { color: #e0d4ff; font-weight: 700; }
.ob-tip-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    flex-shrink: 0;
}
.ob-done-hint {
    font-size: .65rem;
    color: var(--text-muted);
    opacity: .7;
}

/* ═══ Responsive ═══ */
@media (max-width: 380px) {
    .ob-mice-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ob-cat-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .ob-card-body {
        padding: 22px 16px 12px;
    }
}
