/* ═══════════════════════════════════════════
   FUTURE GRAPH DUEL — Aureus
   Dark theme with gold accents
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #06060b;
    --bg-secondary: #0d0d15;
    --bg-card: #111119;
    --bg-card-hover: #16161f;
    --bg-elevated: #1a1a25;

    --gold: #d4a843;
    --gold-light: #f0d078;
    --gold-dim: #a07830;
    --gold-glow: rgba(212, 168, 67, .25);

    --up: #00e676;
    --up-dim: rgba(0, 230, 118, .15);
    --down: #ff1744;
    --down-dim: rgba(255, 23, 68, .15);

    --text: #e8e8ec;
    --text-secondary: #9595a8;
    --text-dim: #5c5c70;
    --border: #1e1e2a;
    --border-light: #2a2a3a;

    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Orbitron', monospace;

    --radius: 10px;
    --radius-lg: 16px;
    --radius-sm: 6px;
    --transition: .2s ease;
    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }

.hidden { display: none !important; }

.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }


/* ═══ HEADER ═══ */
.header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(6, 6, 11, .85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text);
    flex-shrink: 0;
}
.logo-icon {
    font-size: 24px;
    color: var(--gold);
    filter: drop-shadow(0 0 6px var(--gold-glow));
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-main {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
}
.logo-sub { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }

.nav { display: flex; gap: 4px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg-elevated); }
.nav-link.active { color: var(--gold); background: rgba(212, 168, 67, .08); }

.header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* Wallet Connect Button */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; border-radius: var(--radius); transition: all var(--transition); }
.btn-connect {
    padding: 8px 20px;
    font-size: 13px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: #0a0a0f;
    box-shadow: 0 0 20px var(--gold-glow);
}
.btn-connect:hover {
    box-shadow: 0 0 30px rgba(212, 168, 67, .4);
    transform: translateY(-1px);
}

/* Wallet Info (connected state) */
.wallet-info { display: flex; align-items: center; gap: 8px; position: relative; }
.wallet-balance {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 6px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.wallet-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
}
.wallet-badge:hover { border-color: var(--gold-dim); background: var(--bg-card-hover); }
.wallet-dot {
    width: 8px; height: 8px;
    background: var(--up);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 230, 118, .5);
}

.wallet-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    min-width: 180px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    z-index: 50;
}
.dropdown-item {
    display: block; width: 100%;
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.dropdown-item:hover { background: var(--bg-card); color: var(--text); }
.dropdown-item.danger { color: var(--down); }
.dropdown-item.danger:hover { background: var(--down-dim); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.btn-hamburger {
    display: none;
    flex-direction: column; gap: 5px;
    padding: 6px;
}
.btn-hamburger span {
    display: block; width: 20px; height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition);
}


/* ═══ NOTIFICATIONS ═══ */
.notifications {
    position: fixed; top: calc(var(--header-h) + 12px); right: 16px;
    z-index: 200;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.notification {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 13px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all .3s ease;
}
.notification.show { transform: translateX(0); opacity: 1; }
.notification.success { border-color: rgba(0, 230, 118, .3); }
.notification.error { border-color: rgba(255, 23, 68, .3); }
.notif-icon { font-size: 16px; font-weight: 700; }
.notification.success .notif-icon { color: var(--up); }
.notification.error .notif-icon { color: var(--down); }
.notification.info .notif-icon { color: var(--gold); }


/* ═══ MAIN ═══ */
.main {
    padding-top: var(--header-h);
    min-height: 100vh;
}


/* ═══ HERO ═══ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h));
    padding: 60px 24px;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    pointer-events: none;
}
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(212, 168, 67, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 168, 67, .03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 70%);
}
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: glow-drift 8s ease-in-out infinite alternate;
}
.hero-glow-1 {
    width: 500px; height: 500px;
    background: rgba(212, 168, 67, .08);
    top: 10%; left: 20%;
}
.hero-glow-2 {
    width: 400px; height: 400px;
    background: rgba(80, 60, 200, .06);
    bottom: 10%; right: 15%;
    animation-delay: -4s;
}
@keyframes glow-drift {
    to { transform: translate(40px, -30px) scale(1.1); }
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 700px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 4px;
    margin-bottom: 24px;
}
.hero-title-line { display: block; }
.hero-title-line.accent {
    color: var(--gold);
    text-shadow: 0 0 40px var(--gold-glow);
}
.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}
.hero-desc strong { color: var(--text); }

.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 36px; }
.tag {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(212, 168, 67, .08);
    border: 1px solid rgba(212, 168, 67, .15);
    border-radius: 100px;
}

.btn-hero {
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: #0a0a0f;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px var(--gold-glow);
    transition: all .3s ease;
}
.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(212, 168, 67, .4);
}
.btn-hero:active { transform: translateY(0); }


/* ═══ SECTIONS ═══ */
.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text);
}

.how-it-works, .features, .pairs-preview {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card {
    position: relative;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.step-card:hover { border-color: var(--gold-dim); transform: translateY(-4px); }
.step-number {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: rgba(212, 168, 67, .08);
    position: absolute; top: 16px; right: 20px;
}
.step-icon { font-size: 32px; margin-bottom: 16px; }
.step-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}
.step-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature-card {
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.feature-icon { font-size: 28px; margin-bottom: 14px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

/* Trading Pairs */
.pairs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 600px; margin: 0 auto; }
.pair-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.pair-card:hover { border-color: var(--gold-dim); }
.pair-icon {
    font-size: 28px;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212, 168, 67, .08);
    border-radius: 50%;
    color: var(--gold);
}
.pair-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pair-symbol { font-weight: 700; font-size: 16px; letter-spacing: 1px; }
.pair-name { font-size: 12px; color: var(--text-dim); }
.pair-badge {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
}
.pair-badge.live {
    color: var(--up);
    background: var(--up-dim);
}


/* ═══ LOBBY ═══ */
.lobby-header {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    max-width: 1100px; margin: 0 auto;
    padding: 32px 24px 0;
}
.lobby-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
}
.lobby-stats { display: flex; gap: 24px; margin-top: 8px; }
.lobby-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
}
.stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }

.btn-create {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: #0a0a0f;
    border-radius: var(--radius);
    box-shadow: 0 0 20px var(--gold-glow);
    transition: all var(--transition);
}
.btn-create:hover:not(:disabled) { box-shadow: 0 0 30px rgba(212, 168, 67, .4); transform: translateY(-1px); }
.btn-create:disabled { opacity: .4; cursor: not-allowed; }

.lobby-tabs {
    display: flex; gap: 4px;
    max-width: 1100px; margin: 24px auto 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}
.tab-btn {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.lobby-content {
    max-width: 1100px; margin: 0 auto;
    padding: 24px;
    min-height: 300px;
}

.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 24px;
    color: var(--text-dim);
    text-align: center;
}
.empty-state.small { padding: 30px 24px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .3; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 360px; }

.section-subtitle {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.recent-results {
    max-width: 1100px; margin: 0 auto;
    padding: 0 24px 48px;
}


/* ═══ MODAL ═══ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: modal-in .25s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(10px); } }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: var(--text-dim);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-card); color: var(--text); }

.modal-body { padding: 20px 24px 24px; }
.modal-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.wallet-options { display: flex; flex-direction: column; gap: 10px; }
.wallet-option {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    width: 100%;
}
.wallet-option:hover { border-color: var(--gold-dim); background: var(--bg-card-hover); }
.wallet-option.connecting { opacity: .6; pointer-events: none; }

.wallet-opt-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.wallet-opt-info { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.wallet-opt-name { font-size: 15px; font-weight: 600; }
.wallet-status { font-size: 11px; }
.wallet-status.detected { color: var(--up); }
.wallet-status.not-detected { color: var(--text-dim); }
.wallet-opt-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: rgba(212, 168, 67, .08);
}

.modal-footnote {
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
}
.modal-footnote a { font-weight: 600; }


/* ═══ CREATE MATCH MODAL ═══ */
.create-modal { max-width: 480px; }

.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pair-selector { display: flex; gap: 8px; }
.pair-btn {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.pair-btn:hover { border-color: var(--border-light); color: var(--text); }
.pair-btn.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 168, 67, .06);
}
.pair-btn .pair-btn-icon {
    font-size: 18px;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(212, 168, 67, .08);
    border-radius: 50%;
    color: var(--gold);
}

.timeframe-selector { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.tf-btn:hover { border-color: var(--border-light); color: var(--text); }
.tf-btn.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 168, 67, .06);
}

.side-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-btn {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: all var(--transition);
    font-weight: 700;
}
.side-arrow { font-size: 28px; line-height: 1; }
.side-label { font-size: 14px; letter-spacing: 2px; }

.side-up { color: var(--text-dim); }
.side-up:hover { border-color: rgba(0, 230, 118, .3); color: var(--up); }
.side-up.active {
    border-color: var(--up);
    color: var(--up);
    background: var(--up-dim);
    box-shadow: 0 0 20px rgba(0, 230, 118, .15);
}

.side-down { color: var(--text-dim); }
.side-down:hover { border-color: rgba(255, 23, 68, .3); color: var(--down); }
.side-down.active {
    border-color: var(--down);
    color: var(--down);
    background: var(--down-dim);
    box-shadow: 0 0 20px rgba(255, 23, 68, .15);
}

.bet-input-wrap {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}
.bet-input-wrap:focus-within { border-color: var(--gold); }
.bet-input {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    font-family: var(--font-body);
    min-width: 0;
}
.bet-input::placeholder { color: var(--text-dim); }
.bet-input::-webkit-outer-spin-button,
.bet-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bet-input[type=number] { -moz-appearance: textfield; }
.bet-unit {
    display: flex; align-items: center;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(212, 168, 67, .06);
    border-left: 1px solid var(--border);
    letter-spacing: 1px;
}

.fee-summary {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.fee-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}
.fee-row.total {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.fee-value { font-weight: 600; }
.fee-row.total .fee-value { color: var(--gold); }

.btn-submit-match {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: #0a0a0f;
    border-radius: var(--radius);
    box-shadow: 0 0 20px var(--gold-glow);
    transition: all var(--transition);
}
.btn-submit-match:hover {
    box-shadow: 0 0 30px rgba(212, 168, 67, .4);
    transform: translateY(-1px);
}
.btn-submit-match:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.form-group.has-error .pair-btn,
.form-group.has-error .tf-btn,
.form-group.has-error .side-btn,
.form-group.has-error .bet-input-wrap {
    border-color: var(--down) !important;
}
.form-group.has-error .form-label { color: var(--down); }


/* ═══ ROOM CARDS ═══ */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.room-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.room-card:hover { border-color: var(--border-light); }

.room-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.room-pair-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    background: rgba(212, 168, 67, .08);
    border-radius: 50%;
    color: var(--gold);
    flex-shrink: 0;
}
.room-pair-name {
    font-weight: 700;
    font-size: 15px;
    flex: 1;
}
.room-tf-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.room-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.room-bet {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
}
.room-bet-unit {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-weight: 500;
    margin-left: 4px;
}
.side-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
.side-tag.up { color: var(--up); background: var(--up-dim); }
.side-tag.down { color: var(--down); background: var(--down-dim); }

.room-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
}
.room-creator { font-weight: 500; }
.room-time { font-style: italic; }

.room-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.btn-join {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    background: var(--up);
    color: #0a0a0f;
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
    letter-spacing: .5px;
}
.btn-join:hover { box-shadow: 0 0 20px rgba(0, 230, 118, .3); transform: translateY(-1px); }

.btn-cancel-room {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--down);
    border: 1px solid rgba(255, 23, 68, .2);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
}
.btn-cancel-room:hover { background: var(--down-dim); border-color: var(--down); }

.room-countdown {
    flex: 1;
    text-align: center;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
    padding: 10px;
    background: rgba(212, 168, 67, .06);
    border: 1px solid rgba(212, 168, 67, .15);
    border-radius: var(--radius);
}

.room-live-prices {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}
.room-live-prices .leading { font-weight: 700; }
.room-live-prices .leading.up { color: var(--up); }
.room-live-prices .leading.down { color: var(--down); }

.lobby-no-api {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-dim);
    font-size: 14px;
}
.lobby-no-api code {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--gold);
}

@media (max-width: 480px) {
    .rooms-grid { grid-template-columns: 1fr; }
}


/* ═══ FOOTER ═══ */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--text-dim);
}
.footer-logo { font-family: var(--font-display); font-size: 11px; letter-spacing: 1px; color: var(--text-secondary); }


/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .nav { display: none; }
    .btn-hamburger { display: flex; }

    .nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        gap: 4px;
        z-index: 90;
    }

    .steps-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .pairs-grid { grid-template-columns: 1fr; }

    .hero-title { letter-spacing: 2px; }
    .hero-desc { font-size: 16px; }

    .lobby-header { flex-direction: column; align-items: flex-start; }

    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
    .header-inner { padding: 0 16px; }
    .logo-main { font-size: 11px; letter-spacing: 1px; }
    .wallet-balance { display: none; }
    .btn-connect span { display: none; }
    .btn-connect { padding: 8px 12px; }
}


/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }


/* ═══ SELECTION ═══ */
::selection { background: rgba(212, 168, 67, .25); color: var(--text); }
