:root {
    --bg: #071018;
    --bg-2: #0b1622;
    --panel: #0f1c2a;
    --panel-2: #122131;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.12);
    --text: #e8eef7;
    --muted: #9baec4;
    --soft: #7f93aa;
    --blue: #3ec5ff;
    --cyan: #00e0ff;
    --green: #21c77a;
    --yellow: #ffcf5a;
    --orange: #ff9b52;
    --red: #ff5f6d;
    --chip: #152638;
    --shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

html,
body {
    background:
        radial-gradient(circle at top left, rgba(0, 224, 255, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(62, 197, 255, 0.07), transparent 22%),
        linear-gradient(180deg, #061018 0%, #08131d 100%);
    color: var(--text);
    min-height: 100%;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    margin: 0;
}

.page-shell {
    width: 100%;
    max-width: 100%;
    padding: 24px 28px 40px 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d4ff, #247cff);
    color: white;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.brand-title {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
    color: #f4f8fc;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 2px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.terminal-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-card {
    background: linear-gradient(180deg, rgba(18, 33, 49, 0.95), rgba(12, 24, 37, 0.98));
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-body {
    padding: 18px 18px 16px 18px;
}

.panel-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 2.2rem;
    line-height: 1.08;
    font-weight: 900;
    margin: 0 0 10px 0;
    color: #f6fbff;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: var(--muted);
    font-size: 1rem;
    margin: 0 0 14px 0;
}

.summary-box {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    color: #e7eef7;
    line-height: 1.62;
    font-size: 0.98rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.metric-label {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
    font-weight: 700;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #f5f9fd;
    line-height: 1.1;
    margin-bottom: 5px;
}

.metric-sub {
    color: var(--soft);
    font-size: 0.84rem;
}

.shift-band {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.shift-title {
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.shift-text {
    color: var(--muted);
    margin-bottom: 10px;
    line-height: 1.45;
}

.shift-right {
    min-width: 220px;
    text-align: right;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 10px 0;
    color: #f5f9fd;
}

.section-subtitle {
    color: var(--muted);
    margin: 0 0 16px 0;
}

.status-pill,
.topic-pill,
.edge-pill,
.dir-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.topic-pill {
    background: rgba(62, 197, 255, 0.13);
    color: #75dcff;
    border-color: rgba(62, 197, 255, 0.18);
    margin-right: 6px;
    margin-bottom: 6px;
}

.status-best {
    background: rgba(33, 199, 122, 0.16);
    color: #71ebb2;
    border-color: rgba(33, 199, 122, 0.25);
}

.status-watch {
    background: rgba(255, 207, 90, 0.14);
    color: #ffd977;
    border-color: rgba(255, 207, 90, 0.22);
}

.status-avoid {
    background: rgba(255, 255, 255, 0.08);
    color: #c6d0db;
    border-color: rgba(255, 255, 255, 0.12);
}

.dir-bull {
    background: rgba(33, 199, 122, 0.16);
    color: #78ebb6;
    border-color: rgba(33, 199, 122, 0.24);
}

.dir-bear {
    background: rgba(255, 95, 109, 0.16);
    color: #ff929d;
    border-color: rgba(255, 95, 109, 0.24);
}

.dir-unclear {
    background: rgba(255, 255, 255, 0.08);
    color: #c7d2dd;
    border-color: rgba(255, 255, 255, 0.12);
}

.edge-high {
    background: rgba(33, 199, 122, 0.16);
    color: #71ebb2;
    border-color: rgba(33, 199, 122, 0.24);
}

.edge-medium {
    background: rgba(255, 207, 90, 0.16);
    color: #ffdc82;
    border-color: rgba(255, 207, 90, 0.24);
}

.edge-low {
    background: rgba(255, 155, 82, 0.16);
    color: #ffb37a;
    border-color: rgba(255, 155, 82, 0.24);
}

.edge-minimal {
    background: rgba(255, 255, 255, 0.08);
    color: #cad3dd;
    border-color: rgba(255, 255, 255, 0.12);
}

.action-band {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 18px;
    background: linear-gradient(180deg, #0d1723, #0b1420);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.action-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.action-sub {
    color: var(--muted);
    font-size: 0.95rem;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn-terminal,
.btn-terminal-outline {
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-terminal {
    background: linear-gradient(135deg, #f3f7fb, #dbe7f2);
    color: #0e1823;
}

.btn-terminal:hover {
    background: linear-gradient(135deg, #ffffff, #e6eef7);
    color: #08111a;
}

.btn-terminal-outline {
    background: transparent;
    color: #edf4fb;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-terminal-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.best-bets-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.bet-card {
    background: linear-gradient(180deg, rgba(16, 29, 43, 0.98), rgba(10, 20, 31, 0.98));
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.bet-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.bet-card-title {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 800;
    color: #f4f8fd;
    margin: 0;
}

.bet-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 14px;
}

.bet-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
}

.bet-stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
    font-weight: 700;
}

.bet-stat-value {
    font-size: 1.02rem;
    color: #f4f8fd;
    font-weight: 800;
    line-height: 1.1;
}

.bet-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.bet-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #f4f8fd;
    font-weight: 700;
}

.bet-open-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.board-wrap {
    background: linear-gradient(180deg, rgba(12, 22, 33, 0.98), rgba(8, 16, 24, 0.99));
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.board-header-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0;
}

.board-header-subtitle {
    color: var(--muted);
    margin-top: 4px;
    font-size: 0.92rem;
}

.board-meta {
    color: var(--soft);
    font-size: 0.88rem;
    white-space: nowrap;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 72vh;
}

.market-board-table {
    width: 100%;
    min-width: 1900px;
    margin: 0;
    color: var(--text);
    border-collapse: separate;
    border-spacing: 0;
}

.market-board-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #111b28;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line-2);
    white-space: nowrap;
}

.market-board-table tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    font-size: 0.93rem;
    white-space: nowrap;
}

.market-board-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.market-board-table .question-col {
    min-width: 430px;
    max-width: 520px;
    white-space: normal;
    line-height: 1.4;
    font-weight: 700;
    color: #f4f8fd;
}

.market-board-table .topic-col {
    min-width: 120px;
}

.market-board-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.market-board-table .center {
    text-align: center;
}

.table-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #eef5fb;
    background: transparent;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.84rem;
}

.table-open-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.empty-box {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
}

.footer-note {
    color: var(--soft);
    text-align: center;
    margin-top: 18px;
    font-size: 0.86rem;
}

@media (max-width: 1400px) {
    .best-bets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .shift-band,
    .action-band,
    .board-header,
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .shift-right {
        text-align: left;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .page-shell {
        padding: 16px 14px 28px 14px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .best-bets-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== TERMINAL MAINTENANCE ALERT ===== */

.service-alert {
    width: 100%;
    background: linear-gradient(90deg, #0c3d91, #1657d8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.alert-inner {
    max-width: 1300px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.alert-left {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-dot {
    width: 12px;
    height: 12px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 12px #ffcc00;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: .6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: .6;
    }
}

.alert-message {
    font-size: 15px;
    opacity: .95;
}

.alert-links {
    display: flex;
    gap: 12px;
}

.alert-btn {
    background: white;
    color: #0c3d91;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: .2s;
}

.alert-btn:hover {
    background: #e6efff;
}

.alert-btn.secondary {
    background: rgba(255, 255, 255, .2);
    color: white;
}

.alert-btn.secondary:hover {
    background: rgba(255, 255, 255, .35);
}

.market-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 22px 0;
}

.market-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    transition: all 0.15s ease;
}

.market-filter-chip:hover {
    color: #f5f9fd;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.market-filter-chip.active {
    color: #08111a;
    background: linear-gradient(135deg, #f3f7fb, #dbe7f2);
    border-color: transparent;
}

.market-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 24px 0;
}

.market-filter-chip {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: all .15s ease;
}

/* ALL */

.chip-all {
    background: rgba(255, 255, 255, .06);
    color: #d0d7df;
}

/* AI */

.chip-ai {
    background: rgba(0, 150, 255, .15);
    color: #6ecbff;
}

/* POLITICS */

.chip-politics {
    background: rgba(255, 80, 80, .15);
    color: #ff7c7c;
}

/* SPORTS */

.chip-sports {
    background: rgba(60, 200, 120, .15);
    color: #6dff9b;
}

/* CRYPTO */

.chip-crypto {
    background: rgba(255, 160, 60, .15);
    color: #ffb76a;
}

/* TECH */

.chip-tech {
    background: rgba(170, 120, 255, .15);
    color: #c6a9ff;
}

/* ACTIVE */

.market-filter-chip.active {
    background: linear-gradient(135deg, #ffffff, #dbe7f2);
    color: #08111a;
    border: none;
}

/* hover */

.market-filter-chip:hover {
    transform: translateY(-1px);
    opacity: .95;
}

.reason-text {
    color: #b8c7dc;
    font-size: 0.84rem;
    line-height: 1.35;
    display: inline-block;
    max-width: 280px;
}

.disabled-row {
    opacity: 0.5;
    cursor: not-allowed;
}

.table-open-btn.disabled {
    color: #888;
    cursor: not-allowed;
    text-decoration: none;
}