/* =============================================================
   main.css — Core GMSim styles
   Extracted from index.html on 2026-05-01 (feature/redesign branch).
   Verbatim content of the original inline <style> blocks. New design
   tokens and component overrides live in tokens.css and components.css
   which are loaded AFTER this file so they cascade on top.
   ============================================================= */

:root {
    --bg: #0a0e14;
    --bg2: #0d1117;
    --card: rgba(22, 27, 34, 0.65);
    --card-solid: #161b22;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #e6edf3;
    --text-dim: #8b949e;
    --accent: #f7931a;
    --accent2: #58a6ff;
    --green: #3fb950;
    --red: #f85149;
    --purple: #bc8cff;
    --current-accent: var(--accent);
    --sidebar-w: 240px;
    --blur: 20px;
    --radius: 16px;
    --radius-sm: 10px;
    --tab-bar-h: 62px;
    /* Section accents */
    --a-dashboard: #f7931a;
    --a-mining: #f7931a;
    --a-scenarios: #58a6ff;
    --a-reinvest: #2ecc71;
    --a-compare: #bc8cff;
    --a-multisim: #e06c75;
    --a-performance: #56d4dd;
    --a-strategy: #f1c40f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    background: var(--bg);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

/* ===== LAYOUT: Sidebar + Main ===== */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0d1117 0%, #0b0f15 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column;
    padding: 16px 0;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 0 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 4px;
}
.sidebar-logo h1 { font-size: 1rem; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; line-height: 1.1; }
.sidebar-logo p { font-size: 0.62rem; color: #4a5568; margin-top: 1px; }
.sidebar-logo-inner { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-badge {
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(247,147,26,0.15), rgba(91,33,182,0.15));
    border: 1px solid rgba(247,147,26,0.2);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.sidebar-logo-badge img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-nav { flex: 1; padding: 4px 0; }

.nav-section-label {
    font-size: 0.58rem; font-weight: 700; color: #4a5568;
    text-transform: uppercase; letter-spacing: 1.5px;
    padding: 10px 14px 3px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; margin: 1px 6px;
    border-radius: 9px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.86em; font-weight: 500;
    transition: all 0.18s ease;
    position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
    color: var(--text);
    background: rgba(247,147,26,0.1);
    font-weight: 600;
}
.nav-item.active[data-tab="scenarios"] { background: rgba(88,166,255,0.08); color: var(--accent2); }
.nav-item.active[data-tab="strategy"] { background: rgba(241,196,15,0.10); color: var(--a-strategy); }
.nav-item.active[data-tab="portfolio"] { background: rgba(63,185,80,0.08); color: var(--green); }
/* Tab nav-icons hidden — text-only labels for a cleaner look.
   To re-enable, change `display:none` to `display:flex`. */
.nav-item .nav-icon { display: none; }
.nav-item .nav-dot {
    display: none; width: 5px; height: 5px; border-radius: 50%;
    background: var(--current-accent); margin-left: auto; flex-shrink: 0;
    box-shadow: 0 0 6px var(--current-accent);
}
.nav-item.active .nav-dot { display: block; }

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 24px 32px;
    min-height: 100vh;
}

/* Container compatibility */
.container { max-width: 100%; }

header { display: none; } /* Replaced by sidebar logo */

.live-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.live-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.live-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }

.live-card .label {
    font-size: 0.7em;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.live-card .value {
    font-size: 1.7em;
    font-weight: 800;
    margin-top: 6px;
    letter-spacing: -0.02em;
}

.live-card .value.btc { color: var(--accent); }
.live-card .value.gmt { color: var(--purple); }
.live-card .value.net { color: var(--accent2); }

.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--card-solid);
    border: 1px solid var(--border);
    color: var(--accent2);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85em;
    margin-bottom: 0;
    transition: border-color 0.2s;
}

.refresh-btn:hover { border-color: var(--accent2); }
.refresh-btn.loading { opacity: 0.5; pointer-events: none; }

.section {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.section h2 {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--current-accent);
    letter-spacing: -0.01em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.85em;
    color: var(--text-dim);
}

.form-group input, .form-group select {
    background: rgba(10,14,20,0.7);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 1em;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--current-accent);
    box-shadow: 0 0 0 3px rgba(88,166,255,0.1);
}

.form-group .hint {
    font-size: 0.75em;
    color: var(--text-dim);
}

.btn-calculate {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: opacity 0.2s;
}

.btn-calculate:hover { opacity: 0.85; }

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.result-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-left: 3px solid var(--current-accent);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.2s;
}
.result-card:hover { transform: translateY(-2px); }

.result-card h3 {
    font-size: 0.75em;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.result-card .big {
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.result-card .sub {
    font-size: 0.85em;
    color: var(--text-dim);
    margin-top: 4px;
}

.positive { color: var(--green); }
.negative { color: var(--red); }

/* Scenario table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

th {
    text-align: right;
    color: var(--text-dim);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

th:first-child, td:first-child { text-align: left; }

tr:hover td { background: rgba(88, 166, 255, 0.05); }
tr.current td { background: rgba(247, 147, 26, 0.1); }

/* Strategy comparison */
.strategy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.strategy-card {
    background: var(--card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    position: relative;
    transition: transform 0.2s;
}
.strategy-card:hover { transform: translateY(-2px); }

.strategy-card.best { border-color: var(--green); }

.strategy-card.best::after {
    content: var(--best-label, 'BEST');
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--green);
    color: #000;
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.strategy-card h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--accent2);
}

.strategy-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9em;
}

.strategy-row:last-child { border-bottom: none; }
.strategy-row .label { color: var(--text-dim); }

/* veGMT section */
.lock-info {
    background: rgba(188, 140, 255, 0.08);
    border: 1px solid rgba(188, 140, 255, 0.25);
    border-radius: 10px;
    padding: 18px;
    margin-top: 15px;
}

.lock-info h4 { color: var(--purple); margin-bottom: 10px; }

.tabs { display: none; } /* Replaced by sidebar nav */

.tab-content { display: none; opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; }
.tab-content.active { display: block; opacity: 1; transform: translateY(0); }

/* Collapsible form */
.collapsible-header {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 0; margin-bottom: 18px;
}
.collapsible-header h2 { margin: 0; border: none; padding: 0; flex: 1; }
.collapsible-summary {
    font-size: 0.8em; color: var(--text-dim); background: rgba(255,255,255,0.05);
    padding: 4px 12px; border-radius: 20px; display: none;
}
.collapsed .collapsible-summary { display: inline-block; }
.collapsible-chevron {
    font-size: 0.8em; color: var(--text-dim); transition: transform 0.3s;
}
.collapsed .collapsible-chevron { transform: rotate(-90deg); }
.collapsible-body {
    max-height: 2000px; overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease; opacity: 1;
}
.collapsed .collapsible-body { max-height: 0; opacity: 0; padding: 0; }

/* Discount sub-group */
.discount-group {
    grid-column: 1 / -1;
    background: rgba(63,185,80,0.04);
    border: 1px solid rgba(63,185,80,0.15);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.discount-group-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    font-size: 0.85em; font-weight: 600; color: var(--text-dim);
}
.discount-group-total { margin-left: auto; color: var(--green); font-size: 1.2em; font-weight: 800; }


.currency-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.cur-btn {
    background: var(--bg);
    border: none;
    color: var(--text-dim);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.2s;
    border-right: 1px solid var(--border);
}

.cur-btn:last-child { border-right: none; }
.cur-btn:hover { color: var(--text); }
.cur-btn.active { background: var(--accent); color: #000; }
.cur-btn[data-cur="btc"].active { background: var(--accent); }
.cur-btn[data-cur="gmt"].active { background: var(--purple); }
.cur-btn[data-cur="usd"].active { background: var(--green); }
.cur-btn.fee-btn[data-fee="gmt"].active { background: var(--purple); color: #000; }
.cur-btn.fee-btn[data-fee="btc"].active { background: var(--accent); color: #000; }

.map-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
}

.map-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-ylabel {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.85em;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 1px;
}

.map-inner { flex: 1; }

.map-xlabel {
    text-align: center;
    font-size: 0.85em;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 8px;
}

.strat-grid {
    display: grid;
    gap: 2px;
    width: 100%;
}

.grid-cell {
    aspect-ratio: 1.8;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: 600;
    color: rgba(0,0,0,0.6);
    position: relative;
    min-height: 36px;
    transition: opacity 0.15s;
}

.grid-cell:hover {
    opacity: 0.8;
    z-index: 1;
}

.grid-cell.current {
    outline: 3px solid #fff;
    outline-offset: -2px;
    z-index: 2;
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
}

.grid-cell.btc-zone { background: #f5c542; }
.grid-cell.gmt-zone { background: #2ecc71; }
.grid-cell.th-zone { background: #3498db; color: rgba(255,255,255,0.8); }
.grid-cell.bad-zone { background: #e74c3c; color: rgba(255,255,255,0.8); }

.grid-label-x, .grid-label-y {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    color: var(--text-dim);
    font-weight: 600;
    padding: 4px;
}

.reco-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.danger-zone-box {
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 10px;
    padding: 20px;
}

.danger-zone-box h3 {
    color: var(--red);
    margin-bottom: 12px;
    font-size: 1em;
}

.danger-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.danger-level {
    background: var(--bg);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.danger-level .label { font-size: 0.8em; color: var(--text-dim); }
.danger-level .price { font-size: 1.4em; font-weight: 700; margin-top: 4px; }
.danger-level .distance { font-size: 0.8em; margin-top: 4px; }

.reserve-alert {
    border: 2px solid var(--red);
    background: rgba(248, 81, 73, 0.1);
    border-radius: 10px;
    padding: 18px;
}

.reserve-alert.ok {
    border-color: var(--green);
    background: rgba(63, 185, 80, 0.1);
}

.reserve-bar {
    height: 10px;
    background: var(--bg);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.reserve-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s;
}

.reco-badge {
    font-size: 2.2em;
    font-weight: 800;
    padding: 10px 25px;
    border-radius: 12px;
    color: #000;
}

.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent2);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(63,185,80,0.6); }
}

.last-update {
    font-size: 0.75em;
    color: var(--text-dim);
    text-align: center;
    margin-top: 5px;
}

/* Live Ticker */
.live-ticker {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #0a0e14;
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
    margin: -24px -32px 24px -32px;
    border-radius: 0 0 var(--radius) var(--radius);
}
.ticker-gain { color: var(--green); font-weight: 700; font-size: 1.1em; }
.ticker-prices { color: var(--text-dim); display: flex; gap: 15px; }
.ticker-prices span { white-space: nowrap; }
.ticker-time { color: var(--text-dim); font-size: 0.85em; }

/* Source badges */
.source-badge {
    display: inline-block;
    font-size: 0.65em;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 4px;
}
.source-badge.api { background: rgba(63,185,80,0.2); color: var(--green); }
.source-badge.public { background: rgba(88,166,255,0.2); color: var(--accent2); }
.source-badge.stale { background: rgba(248,81,73,0.2); color: var(--red); }
.source-badge.auto { background: rgba(188,140,255,0.2); color: var(--purple); }

/* Strategy alert */
.strategy-alert {
    background: linear-gradient(135deg, rgba(247,147,26,0.1), transparent);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alertPulse 2s ease-in-out 3;
}
.strategy-alert .alert-icon { font-size: 1.5em; }
.strategy-alert .alert-text { flex: 1; font-size: 0.9em; }
.strategy-alert .alert-close { cursor: pointer; color: var(--text-dim); padding: 5px; }
@keyframes alertPulse {
    0%, 100% { border-color: var(--accent); }
    50% { border-color: var(--green); box-shadow: 0 0 15px rgba(63,185,80,0.2); }
}

/* Sync status */
.sync-status {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75em; color: var(--text-dim);
}
.sync-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--text-dim);
}
.sync-dot.live { background: var(--green); animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Canvas charts */
.chart-canvas {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
}

/* Multi-scenario sliders */
.slider-group {
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.slider-group label { min-width: 180px; font-size: 0.85em; color: var(--text-dim); }
.slider-group input[type="range"] { flex: 1; accent-color: var(--accent); }
.slider-group .slider-val { min-width: 60px; text-align: right; font-weight: 700; }

/* Performance tracking */
.perf-score {
    font-size: 2em; font-weight: 800; text-align: center; padding: 15px;
}

/* Tooltips */
.has-tooltip {
    position: relative; cursor: help;
    border-bottom: 1px dotted var(--text-dim);
}
.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(13, 17, 23, 0.96);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78em;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 260px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 50;
    text-align: left;
}
.has-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Staggered fade-in animations */
.tab-content.active .live-card,
.tab-content.active .result-card,
.tab-content.active .section {
    animation: fadeInUp 0.35s ease both;
}
.tab-content.active .live-card:nth-child(1), .tab-content.active .section:nth-child(1) { animation-delay: 0s; }
.tab-content.active .live-card:nth-child(2), .tab-content.active .section:nth-child(2) { animation-delay: 0.05s; }
.tab-content.active .live-card:nth-child(3), .tab-content.active .section:nth-child(3) { animation-delay: 0.1s; }
.tab-content.active .live-card:nth-child(4), .tab-content.active .section:nth-child(4) { animation-delay: 0.15s; }
.tab-content.active .section:nth-child(5) { animation-delay: 0.2s; }
.tab-content.active .section:nth-child(6) { animation-delay: 0.25s; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Onboarding overlay */
.onboarding-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); z-index: 500;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.onboarding-card {
    background: var(--card-solid); border-radius: var(--radius);
    padding: 40px; max-width: 600px; width: 100%; text-align: center;
}
.onboarding-card h2 { font-size: 1.5em; margin-bottom: 15px; color: var(--accent); }
.onboarding-card p { color: var(--text-dim); margin-bottom: 20px; line-height: 1.7; }
.onboarding-steps { text-align: left; margin: 20px 0; }
.onboarding-step {
    display: flex; gap: 12px; align-items: flex-start; margin-bottom: 15px;
}
.step-num {
    background: var(--accent); color: #000; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.85em; flex-shrink: 0;
}
.onboarding-btn {
    background: var(--accent); color: #000; border: none; padding: 12px 32px;
    border-radius: var(--radius-sm); font-size: 1em; font-weight: 700;
    cursor: pointer; margin-top: 10px;
}
.onboarding-btn:hover { opacity: 0.85; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 400;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-card {
    background: var(--card-solid); border-radius: var(--radius);
    padding: 30px; max-width: 650px; width: 100%; max-height: 80vh; overflow-y: auto;
}
.modal-card h2 { margin-bottom: 15px; }
.modal-close { float: right; cursor: pointer; color: var(--text-dim); font-size: 1.3em; }

/* Disclaimer banner */
.disclaimer-banner {
    background: rgba(248,81,73,0.08); border: 1px solid rgba(248,81,73,0.2);
    border-radius: var(--radius-sm); padding: 10px 16px;
    font-size: 0.75em; color: var(--text-dim); text-align: center;
    margin-bottom: 16px;
}

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, var(--bg2) 25%, rgba(255,255,255,0.05) 50%, var(--bg2) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Footer */
.site-footer {
    text-align: center; padding: 20px; margin-top: 30px;
    border-top: 1px solid var(--border); font-size: 0.75em; color: var(--text-dim);
}
.site-footer a { color: var(--accent2); text-decoration: none; }

/* Language toggle in sidebar */
.lang-toggle { display: flex; gap: 4px; margin-bottom: 8px; }
.lang-btn {
    flex: 1; padding: 4px 8px; border: 1px solid var(--border); background: transparent;
    color: var(--text-dim); border-radius: 4px; cursor: pointer; font-size: 0.75em; font-weight: 600;
}
.lang-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* =============================================================
   Auth gate (split landing page for anonymous visitors)
   ============================================================= */
#auth-gate { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.gate-left {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(32px,6vw,72px) clamp(28px,5vw,64px);
    background: radial-gradient(ellipse at 15% 55%, #1a1f2e 0%, #0a0e14 60%);
    border-right: 1px solid rgba(255,255,255,0.06);
    position: relative; overflow: hidden;
}
.gate-left-glow1 { position:absolute;top:-100px;left:-100px;width:340px;height:340px;border-radius:50%;background:radial-gradient(circle,rgba(247,147,26,0.06) 0%,transparent 70%);pointer-events:none; }
.gate-left-glow2 { position:absolute;bottom:-80px;right:-60px;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,rgba(91,33,182,0.09) 0%,transparent 70%);pointer-events:none; }
.gate-right {
    width: 420px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 44px;
    background: #0d1117;
}
.gate-feature { display:flex;align-items:center;gap:10px;margin-bottom:10px; }
.gate-feature-icon { width:29px;height:29px;border-radius:7px;background:rgba(247,147,26,0.07);border:1px solid rgba(247,147,26,0.13);display:flex;align-items:center;justify-content:center;font-size:.82em;flex-shrink:0; }
.gate-community-link {
    flex:1;display:flex;align-items:center;gap:9px;
    padding:10px 13px;border-radius:10px;text-decoration:none;
    transition:all .2s;
}
@keyframes gate-blink { 0%,100%{opacity:1} 50%{opacity:.25} }
@keyframes gate-shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
@media (max-width: 700px) {
    #auth-gate { flex-direction: column !important; }
    .gate-left { padding: 32px 24px; }
    .gate-right { width: 100% !important; padding: 28px 24px; }
}
