/* ═══════════════════════════════════════════════════════════════
   CyMetica-42 Arena — Blue vs Red AI Hedge Fund Battle
   ═══════════════════════════════════════════════════════════════ */

.arena-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

/* ── Tradable Event Upside Panel ────────────────────────────── */

.arena-tradable-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0 0.25rem;
    margin-bottom: 0.25rem;
}

.arena-tradable-event-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #00aaff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.arena-tradable-event-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #00aaff, #33ccff);
    border-radius: 2px;
    animation: arenaPulse 2s infinite;
}

@keyframes arenaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.arena-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 4px;
    margin-left: 8px;
}

.arena-live-indicator::before {
    content: '';
    width: 5px;
    height: 5px;
    background: #00ff88;
    border-radius: 50%;
    animation: arenaPulse 2s infinite;
}

.arena-all-markets-link {
    font-size: 0.75rem;
    color: #00aaff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 170, 255, 0.25);
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.arena-all-markets-link:hover {
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.5);
    color: #33ccff;
}

.arena-all-markets-link svg {
    width: 14px;
    height: 14px;
}

.arena-unfurl-panel {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 16px;
    padding: 0.75rem 1.5rem 1rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.arena-unfurl-panel:hover {
    border-color: rgba(0, 150, 255, 0.4);
}

.arena-unfurl-image {
    flex: 0 0 25%;
    max-width: 25%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 20, 40, 0.5);
}

.arena-unfurl-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.arena-unfurl-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    min-width: 0;
}

.arena-unfurl-info h2 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    color: #ffffff;
    line-height: 1.3;
    word-wrap: break-word;
}

.arena-unfurl-desc {
    color: #9DA3A8;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.arena-unfurl-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.arena-unfurl-source {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    color: #00cfff;
    font-size: 0.75rem;
    white-space: nowrap;
}

.arena-unfurl-source img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.arena-unfurl-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #00cfff, #0088ff);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.2s;
    align-self: flex-start;
}

.arena-unfurl-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 207, 255, 0.4);
}

.arena-unfurl-cta svg {
    width: 16px;
    height: 16px;
}

/* Downside (Red Team) modifiers */
.arena-tradable-event-title.downside {
    color: #ff4444;
}

.arena-tradable-event-title.downside::before {
    background: linear-gradient(135deg, #ff4444, #ff6666);
}

.arena-unfurl-panel.downside {
    border-color: rgba(255, 68, 68, 0.15);
}

.arena-unfurl-panel.downside:hover {
    border-color: rgba(255, 68, 68, 0.4);
}

.arena-unfurl-cta.downside {
    background: linear-gradient(135deg, #ff4444, #cc2200);
}

.arena-unfurl-cta.downside:hover {
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

@media (max-width: 600px) {
    .arena-unfurl-panel {
        flex-direction: column;
        padding: 0.75rem;
    }
    .arena-unfurl-image {
        flex: none;
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }
    .arena-tradable-event-header {
        padding: 0.5rem 0 0.25rem;
        gap: 0.5rem;
    }
}

/* ── Price Chart ────────────────────────────────────────────── */

.arena-chart-section {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

/* Chart header: prices left, range tabs right */
.arena-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.arena-chart-prices {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.arena-chart-team {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.arena-team-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.arena-team-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
}

.arena-team-price {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.arena-chart-vol-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: #5a6a7a;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* Range tab buttons — industry standard pill style */
.arena-chart-ranges {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 2px;
}

.chart-range-btn {
    background: transparent;
    border: none;
    color: #5a6a7a;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
}

.chart-range-btn:hover {
    color: #9aabb8;
    background: rgba(255, 255, 255, 0.04);
}

.chart-range-btn.active {
    color: #ffffff;
    background: rgba(0, 207, 255, 0.12);
    font-weight: 700;
}

#arenaChartContainer {
    border-radius: 8px;
    overflow: hidden;
}

#arenaChartContainer .tv-lightweight-charts {
    border-radius: 8px;
}

/* Hide library watermark — Apache 2.0 licensed, no branding required */
#arenaChartContainer a[href*="tradingview"],
#arenaChartContainer [class*="watermark"],
#arenaChartContainer svg[viewBox] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 600px) {
    .arena-chart-section {
        padding: 0.75rem;
    }
    #arenaChartContainer {
        height: 360px;
    }
    .arena-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .chart-range-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}

/* ── Yes/No Orderbook (Collapsible) ────────────────────────── */

.arena-yesno-section {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.arena-yesno-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
}

.arena-yesno-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.arena-yesno-toggle-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.arena-yesno-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.85rem;
    color: #ffffff;
}

.arena-yesno-prices {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.arena-yesno-yes { color: #00cfff; font-weight: 600; }
.arena-yesno-no { color: #ff4444; font-weight: 600; }
.arena-yesno-sep { color: #7B8794; }

.arena-yesno-chevron {
    width: 18px;
    height: 18px;
    color: #7B8794;
    transition: transform 0.2s;
}

.arena-yesno-chevron.open {
    transform: rotate(180deg);
}

.arena-yesno-body {
    border-top: 1px solid rgba(0, 150, 255, 0.08);
    padding: 0 1.25rem 1rem;
}

.arena-yesno-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.arena-yesno-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #7B8794;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.arena-yesno-tab.active {
    color: #ffffff;
    background: rgba(0, 207, 255, 0.1);
    border-color: rgba(0, 207, 255, 0.3);
}

.arena-yesno-tab[data-team="RED"].active {
    background: rgba(255, 68, 68, 0.1);
    border-color: rgba(255, 68, 68, 0.3);
}

.arena-yesno-tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.arena-yesno-tab-dot.blue { background: #00cfff; }
.arena-yesno-tab-dot.red { background: #ff4444; }

.arena-yesno-book {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.arena-yesno-book-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.4rem 0;
    color: #7B8794;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.arena-yesno-asks,
.arena-yesno-bids {
    max-height: 150px;
    overflow-y: auto;
}

.arena-yesno-book-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 3px 0;
    position: relative;
    cursor: pointer;
}

.arena-yesno-book-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.arena-yesno-asks .arena-yesno-book-row .price { color: #ff4444; }
.arena-yesno-bids .arena-yesno-book-row .price { color: #00ff88; }
.arena-yesno-book-row .size { color: #c0d0e0; }
.arena-yesno-book-row .cumulative { color: #7B8794; text-align: right; }

.arena-yesno-spread {
    padding: 0.4rem 0;
    text-align: center;
    color: #7B8794;
    font-size: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.arena-yesno-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding-top: 0.75rem;
}

.arena-yesno-buy,
.arena-yesno-sell {
    padding: 0.65rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.arena-yesno-buy {
    background: rgba(0, 207, 255, 0.15);
    color: #00cfff;
    border: 1px solid rgba(0, 207, 255, 0.3);
}

.arena-yesno-buy:hover {
    background: rgba(0, 207, 255, 0.25);
}

.arena-yesno-sell {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.arena-yesno-sell:hover {
    background: rgba(255, 68, 68, 0.25);
}

/* ── Hero Banner ────────────────────────────────────────────── */

.arena-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 100, 200, 0.15) 0%, rgba(10, 14, 23, 0.95) 50%, rgba(200, 40, 40, 0.15) 100%);
    border: 1px solid rgba(0, 207, 255, 0.12);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    overflow: hidden;
}

.arena-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.arena-hero-inner {
    position: relative;
    z-index: 1;
}

.arena-hero-badge {
    display: inline-block;
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    margin-bottom: 0;
    animation: arena-pulse 2s ease-in-out infinite;
}

@keyframes arena-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.arena-hero-tagline {
    font-size: 0.95rem;
    color: #00cfff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.arena-hero-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.2rem;
    color: #ffffff;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.arena-hero-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 1.5rem;
}

.arena-epoch-bar {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(17, 26, 40, 0.8);
    border: 1px solid rgba(0, 207, 255, 0.15);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
}

.arena-epoch-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.arena-epoch-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #00cfff;
    text-shadow: 0 0 12px rgba(0, 207, 255, 0.4);
}

/* ── Scoreboard ──────────────────────────────────────────────�� */

.arena-scoreboard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.arena-team {
    background: rgba(17, 26, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.arena-team-blue {
    border-color: rgba(0, 207, 255, 0.2);
}

.arena-team-red {
    border-color: rgba(255, 68, 68, 0.2);
}

.arena-team-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.arena-team-badge.blue {
    background: rgba(0, 207, 255, 0.15);
    color: #00cfff;
    border: 1px solid rgba(0, 207, 255, 0.3);
}

.arena-team-badge.red {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.arena-team-name {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.arena-team-nav {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.arena-team-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.arena-team-pnl.positive { color: #00ff88; }
.arena-team-pnl.negative { color: #ff4444; }

.arena-team-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.15rem;
}

.arena-team-wins {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
}

.arena-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.arena-vs-score {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.8rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.arena-vs-score span:first-child { color: #00cfff; }
.arena-vs-score span:last-child { color: #ff4444; }
.arena-vs-dash { color: rgba(255, 255, 255, 0.3); }

.arena-vs-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.25rem;
}

/* ── Orderbook ──────────────────────────────────────────────── */

/* ── Trade Entry (Kalshi-style) ─────────────────────────────── */

.arena-trade-entry {
    background: rgba(17, 26, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.arena-outcome-pick {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.arena-outcome-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(17, 26, 40, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.arena-outcome-btn .arena-outcome-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.arena-outcome-btn .arena-outcome-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.arena-outcome-btn.blue:hover,
.arena-outcome-btn.blue.active {
    background: rgba(0, 207, 255, 0.08);
    border-color: #00cfff;
}
.arena-outcome-btn.blue.active .arena-outcome-label { color: #00cfff; }
.arena-outcome-btn.blue.active .arena-outcome-price { color: #00cfff; }

.arena-outcome-btn.red:hover,
.arena-outcome-btn.red.active {
    background: rgba(255, 68, 68, 0.08);
    border-color: #ff4444;
}
.arena-outcome-btn.red.active .arena-outcome-label { color: #ff4444; }
.arena-outcome-btn.red.active .arena-outcome-price { color: #ff4444; }

.arena-amount-row {
    margin-bottom: 0.75rem;
}

.arena-amount-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.35rem;
    letter-spacing: 0.03em;
}

.arena-amount-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.arena-amount-input-wrap:focus-within {
    border-color: rgba(0, 207, 255, 0.4);
}

.arena-amount-currency {
    padding: 0.6rem 0 0.6rem 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

.arena-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 0.75rem 0.6rem 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    outline: none;
    width: 100%;
}

.arena-quick-amounts {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.arena-quick-btn {
    flex: 1;
    padding: 0.35rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(17, 26, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.15s;
}

.arena-quick-btn:hover {
    border-color: rgba(0, 207, 255, 0.25);
    color: rgba(255, 255, 255, 0.7);
}

.arena-quick-btn.active {
    background: rgba(0, 207, 255, 0.08);
    border-color: rgba(0, 207, 255, 0.3);
    color: #00cfff;
}

.arena-payout-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
    border-top: 1px solid rgba(0, 150, 255, 0.06);
    border-bottom: 1px solid rgba(0, 150, 255, 0.06);
}

.arena-payout-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.arena-payout-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.03em;
}

.arena-payout-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.arena-payout-value.green { color: #00ff88; }
.arena-payout-value.green small { opacity: 0.7; }

.arena-trade-submit {
    width: 100%;
    padding: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.arena-trade-submit.blue {
    background: #00cfff;
    color: #0a0e17;
}

.arena-trade-submit.blue:hover {
    background: #33d9ff;
}

.arena-trade-submit.red {
    background: #ff4444;
    color: #ffffff;
}

.arena-trade-submit.red:hover {
    background: #ff6666;
}

.arena-trade-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.arena-order-status {
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    min-height: 1.2rem;
    text-align: center;
}

/* ── Positions Table ────────────────────────────────────────── */

.arena-positions {
    background: rgba(17, 26, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.arena-positions h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    margin: 0 0 1rem;
}

.arena-positions-table {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.arena-positions-table th {
    text-align: left;
    padding: 0.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 150, 255, 0.08);
}

.arena-positions-table td {
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 150, 255, 0.04);
}

.arena-positions-table .team-blue { color: #00cfff; }
.arena-positions-table .team-red { color: #ff4444; }
.arena-positions-table .pnl-positive { color: #00ff88; }
.arena-positions-table .pnl-negative { color: #ff4444; }

/* ── Epoch History ────────────────────────────────────────── */

.arena-epoch-history {
    background: rgba(17, 26, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: auto;
}

.arena-epoch-history h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1rem;
    color: #ffffff;
    margin: 0 0 1rem;
}

.arena-epoch-table {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    border-collapse: collapse;
}

.arena-epoch-table th {
    text-align: left;
    padding: 0.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 150, 255, 0.08);
}

.arena-epoch-table td {
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 150, 255, 0.04);
}

.arena-epoch-table .epoch-winner-blue { color: #00cfff; font-weight: 600; }
.arena-epoch-table .epoch-winner-red { color: #ff4444; font-weight: 600; }
.arena-epoch-table .epoch-draw { color: rgba(255, 255, 255, 0.4); }
.arena-epoch-table .epoch-active { color: #00ff88; }
.arena-epoch-table .epoch-failed { color: rgba(255, 255, 255, 0.25); }

.arena-epoch-empty {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem 0;
    display: none;
}

@media (max-width: 600px) {
    .arena-epoch-bar {
        gap: 0.5rem;
        padding: 0.4rem 0.75rem;
    }
    .arena-hero-badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }
    .arena-epoch-label { font-size: 0.7rem; }
    .arena-epoch-timer { font-size: 0.7rem; }
    .arena-epoch-history { padding: 0.75rem; }
    .arena-epoch-table { font-size: 0.7rem; table-layout: fixed; width: 100%; }
    .arena-epoch-table th,
    .arena-epoch-table td { padding: 0.3rem 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    /* Column widths on mobile: Epoch 13%, Result 37%, Perf 27%, Date 23% */
    .arena-epoch-table th:nth-child(1),
    .arena-epoch-table td:nth-child(1) { width: 13%; }
    .arena-epoch-table th:nth-child(2),
    .arena-epoch-table td:nth-child(2) { width: 37%; }
    .arena-epoch-table th:nth-child(3),
    .arena-epoch-table td:nth-child(3) { width: 27%; text-align: right; }
    .arena-epoch-table th:nth-child(4),
    .arena-epoch-table td:nth-child(4) { width: 23%; text-align: right; }
}

/* ── Order Receipt Banner ──────────────────────────────────── */

.arena-order-receipt {
    background: rgba(17, 26, 40, 0.85);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    animation: arena-receipt-in 0.3s ease-out;
    transition: opacity 0.3s ease;
}
.arena-order-receipt.red {
    border-color: rgba(255, 68, 68, 0.3);
}
@keyframes arena-receipt-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.arena-receipt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}
.arena-receipt-status {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}
.arena-receipt-dismiss {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.arena-receipt-dismiss:hover {
    color: rgba(255,255,255,0.8);
}
.arena-receipt-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.5rem;
}
.arena-receipt-item {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}
.arena-receipt-label {
    color: rgba(255,255,255,0.4);
}
.arena-receipt-value {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}
.arena-receipt-footer {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
}

/* ── Positions Highlight ──────────────────────────────────── */

@keyframes arena-positions-pulse {
    0% { border-color: rgba(0, 255, 136, 0.5); box-shadow: 0 0 12px rgba(0, 255, 136, 0.15); }
    100% { border-color: rgba(0, 150, 255, 0.12); box-shadow: none; }
}
.arena-positions-highlight {
    animation: arena-positions-pulse 2s ease-out forwards;
}

/* ── Trade Submit Green (View Positions) ──────────────────── */

.arena-trade-submit.green {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #0a0e17;
}
.arena-trade-submit.green:hover {
    background: linear-gradient(135deg, #00cc6a, #00ff88);
}

@media (max-width: 600px) {
    .arena-receipt-body {
        grid-template-columns: 1fr;
    }
}

/* ── Feed Section ───────────────────────────────────────────── */

.arena-feed-section {
    background: rgba(17, 26, 40, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
}

.arena-feed-section h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.9rem;
    color: #ffffff;
    margin: 0 0 0.75rem;
}

.arena-feed-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.arena-trades-list,
.arena-headlines-list {
    max-height: 250px;
    overflow-y: auto;
}

.arena-feed-empty {
    text-align: center;
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

.arena-trade-row,
.arena-headline-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(0, 150, 255, 0.04);
    animation: arena-fade-in 0.3s ease;
    min-width: 0;
}

.arena-trade-row {
    overflow: hidden;
    align-items: center;
}

.arena-trade-row > span:first-child {
    flex: 0 0 90px;
    text-align: left;
}

.arena-trade-row > span:nth-child(2) {
    flex: 1 1 auto;
    text-align: right;
}

.arena-trade-row > span:last-child {
    flex: 0 0 auto;
    text-align: right;
    margin-left: 8px;
}

@keyframes arena-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.arena-trade-row .team-blue { color: #00cfff; }
.arena-trade-row .team-red { color: #ff4444; }
.arena-trade-row .team-blue.sell { color: #00cfff; opacity: 0.65; }
.arena-trade-row .team-red.sell { color: #ff4444; opacity: 0.65; }
.arena-trade-row .trade-meta { color: rgba(255, 255, 255, 0.35); }

.arena-headline-row {
    align-items: center;
}

.arena-headline-row .headline-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.arena-headline-row .headline-text {
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.arena-headline-row a.headline-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.arena-headline-row a.headline-link:hover {
    color: #00cfff;
    text-decoration: underline;
}

.arena-headline-row .headline-sentiment {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.arena-headline-row .sentiment-positive { color: #00ff88; }
.arena-headline-row .sentiment-negative { color: #ff4444; }

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    .arena-scoreboard {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .arena-vs {
        flex-direction: row;
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .arena-vs-score {
        font-size: 1.4rem;
    }

    .arena-hero-title {
        font-size: 1.6rem;
    }

    .arena-feed-cols {
        grid-template-columns: 1fr;
    }
    .arena-trade-row {
        font-size: 0.65rem;
    }
    .arena-trade-row > span:first-child {
        flex: 0 0 70px;
    }

    .arena-hero {
        padding: 1.5rem 1rem;
    }

    .arena-trade-entry {
        max-width: 100%;
    }
}

/* ── Light Theme ────────────────────────────────────────────── */

[data-theme="light"] .arena-hero {
    background: linear-gradient(135deg, rgba(0, 100, 200, 0.08) 0%, rgba(245, 248, 255, 0.95) 50%, rgba(200, 40, 40, 0.08) 100%);
    border-color: rgba(0, 100, 200, 0.12);
}

[data-theme="light"] .arena-hero-tagline { color: #0077aa; }
[data-theme="light"] .arena-hero-title { color: #0f172a; }
[data-theme="light"] .arena-hero-subtitle { color: rgba(15, 23, 42, 0.6); }

[data-theme="light"] .arena-team,
[data-theme="light"] .arena-trade-entry,
[data-theme="light"] .arena-positions,
[data-theme="light"] .arena-epoch-history,
[data-theme="light"] .arena-feed-section {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 100, 200, 0.1);
}

[data-theme="light"] .arena-epoch-table th { color: rgba(15, 23, 42, 0.4); }
[data-theme="light"] .arena-epoch-table td { color: rgba(15, 23, 42, 0.8); border-bottom-color: rgba(0, 100, 200, 0.06); }
[data-theme="light"] .arena-epoch-table .epoch-winner-blue { color: #0080cc; }
[data-theme="light"] .arena-epoch-table .epoch-winner-red { color: #cc3333; }
[data-theme="light"] .arena-epoch-table .epoch-draw { color: rgba(15, 23, 42, 0.35); }
[data-theme="light"] .arena-epoch-table .epoch-failed { color: rgba(15, 23, 42, 0.25); }
[data-theme="light"] .arena-epoch-empty { color: rgba(15, 23, 42, 0.3); }
[data-theme="light"] .arena-epoch-history h3 { color: #0f172a; }

[data-theme="light"] .arena-team-name { color: #0f172a; }
[data-theme="light"] .arena-team-nav { color: #0f172a; }
[data-theme="light"] .arena-vs-score span:first-child { color: #0080cc; }

[data-theme="light"] .arena-amount-input {
    color: #0f172a;
}

/* ── Trade Modal ───────────────────────────────────────────── */

.arena-trade-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.arena-trade-modal-backdrop.visible {
    display: block;
}

.arena-trade-modal {
    display: none;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    max-height: 65vh;
    overflow-y: auto;
    background: #0d1520;
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    z-index: 9999;
    transition: transform 0.25s ease-out;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.arena-trade-modal.visible {
    display: block;
    transform: translateX(-50%) translateY(0);
}

/* Drag handle for mobile bottom sheet */
.arena-trade-modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: 10px auto 4px;
}

.arena-trade-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem 0.5rem;
    border-bottom: 1px solid rgba(0, 150, 255, 0.08);
}

.arena-trade-modal-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.arena-trade-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.arena-trade-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.arena-trade-modal-body {
    padding: 0.75rem 1.25rem 1rem;
}

.arena-trade-modal-body .arena-outcome-pick { margin-bottom: 0.75rem; }
.arena-trade-modal-body .arena-amount-row { margin-bottom: 0.5rem; }
.arena-trade-modal-body .arena-quick-amounts { margin-bottom: 0.75rem; }
.arena-trade-modal-body .arena-payout-row { margin-bottom: 0.75rem; }

@media (min-width: 600px) {
    .arena-trade-modal {
        bottom: auto;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        border-radius: 16px;
        border-bottom: 1px solid rgba(0, 150, 255, 0.15);
        max-height: 85vh;
    }
    .arena-trade-modal.visible {
        transform: translate(-50%, -50%) scale(1);
    }
}

[data-theme="light"] .arena-trade-modal {
    background: #ffffff;
    border-color: rgba(0, 100, 200, 0.12);
}
[data-theme="light"] .arena-trade-modal-header h3 { color: #0f172a; }

/* ── Kalshi-style Probability Bars ─────────────────────────── */
.arena-prob-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.arena-prob-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.arena-prob-row:last-of-type {
    margin-bottom: 0;
}
.arena-prob-bar-wrap {
    flex: 1;
    height: 32px;
    background: rgba(0, 150, 255, 0.04);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: opacity 0.15s;
}
.arena-prob-bar-wrap:hover,
.arena-prob-bar-wrap:focus-visible {
    opacity: 0.85;
    outline: 1px solid rgba(0, 207, 255, 0.4);
    outline-offset: 1px;
}
.arena-prob-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
    min-width: 4px;
}
.arena-prob-bar-fill.blue {
    background: linear-gradient(90deg, rgba(0, 207, 255, 0.25), rgba(0, 207, 255, 0.5));
}
.arena-prob-bar-fill.red {
    background: linear-gradient(90deg, rgba(255, 68, 68, 0.25), rgba(255, 68, 68, 0.5));
}
.arena-prob-bar-label {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.arena-prob-multiplier {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    min-width: 42px;
    text-align: right;
}
.arena-prob-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 10px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
}
.arena-prob-pill.blue {
    border: 1.5px solid #00cfff;
    color: #00cfff;
}
.arena-prob-pill.red {
    border: 1.5px solid #ff4444;
    color: #ff4444;
}
.arena-prob-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 150, 255, 0.08);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}
.arena-prob-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .arena-prob-card {
        padding: 0.85rem 1rem;
    }
    .arena-prob-bar-wrap {
        height: 30px;
    }
}

@media (max-width: 600px) {
    .arena-prob-card {
        padding: 0.75rem 1rem;
    }
    .arena-prob-bar-wrap {
        height: 28px;
    }
    .arena-prob-bar-label {
        font-size: 0.7rem;
    }
    .arena-prob-multiplier {
        font-size: 0.7rem;
    }
    .arena-prob-pill {
        font-size: 0.7rem;
        min-width: 40px;
        padding: 3px 8px;
    }
    .arena-prob-stats {
        font-size: 0.65rem;
    }
}

/* Light theme overrides for probability bars */
[data-theme="light"] .arena-prob-card {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(0, 100, 200, 0.12);
}
[data-theme="light"] .arena-prob-bar-wrap {
    background: rgba(0, 100, 200, 0.06);
}
[data-theme="light"] .arena-prob-bar-label {
    color: rgba(15, 23, 42, 0.9);
}
[data-theme="light"] .arena-prob-multiplier {
    color: rgba(15, 23, 42, 0.5);
}
[data-theme="light"] .arena-prob-stats {
    border-top-color: rgba(0, 100, 200, 0.1);
    color: rgba(15, 23, 42, 0.45);
}
