:root {
    --bg: #080B10;
    --bg2: #0F1319;
    --bg3: #161C26;
    --card: #111722;
    --card2: #0E1420;
    --border: rgba(255, 255, 255, 0.07);
    --border2: rgba(255, 255, 255, 0.13);
    --gold: #F0B429;
    --gold2: #FFD97D;
    --green: #0ECB81;
    --green2: #00A36C;
    --red: #F6465D;
    --red2: #B82238;
    --blue: #1B6FD8;
    --blue2: #4D9FFF;
    --text: #E8ECF4;
    --text2: #A0AAB8;
    --text3: #606878;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Syne', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: .5;
}

::-webkit-scrollbar {
    width: 5px
}

::-webkit-scrollbar-track {
    background: var(--bg)
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px
}

/* ── NAVBAR ── */
.navbar {
    background: rgba(8, 11, 16, .94);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 13px 0;
    position: sticky;
    top: 0;
    z-index: 200;
}

.brand-flag {
    display: flex;
    border-radius: 3px;
    overflow: hidden;
    height: 15px;
    gap: 2px
}

.brand-flag span {
    display: block;
    width: 9px;
    height: 100%
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 19px;
    color: var(--text)
}

.brand-name em {
    font-style: normal;
    color: var(--gold)
}

.nav-link {
    color: var(--text2) !important;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 13px !important;
    border-radius: 6px;
    transition: color .2s, background .2s
}

.nav-link:hover {
    color: var(--text) !important;
    background: rgba(255, 255, 255, .05)
}

.btn-deposit {
    background: var(--gold);
    color: #000 !important;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all .2s;
    text-decoration: none
}

.btn-deposit:hover {
    background: var(--gold2);
    transform: translateY(-1px)
}

.wallet-bal {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text2);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px
}

.wallet-bal strong {
    color: var(--green)
}

/* ── BREADCRUMB ── */
.breadcrumb-bar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 10px 0
}

.bc-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text3)
}

.bc-inner a {
    color: var(--text3);
    text-decoration: none;
    transition: color .2s
}

.bc-inner a:hover {
    color: var(--gold)
}

.bc-sep {
    opacity: .4
}

/* ── LAYOUT ── */
.page-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-rows: auto;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.main-col {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 20px
}

.side-col {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 16px
}

/* ── CARD BASE ── */
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.panel-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px
}

.panel-body {
    padding: 20px 22px
}

/* ── MARKET HEADER ── */
.mkt-header {
    padding: 24px 28px 20px
}

.mkt-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(240, 180, 41, .15);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 14px;
}

.mkt-q {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.8vw, 28px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.4px;
    margin-bottom: 18px;
}

.mkt-meta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text2);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    padding: 4px 11px;
    border-radius: 100px;
}

.meta-pill i {
    font-size: 11px
}

.share-btn {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border2);
    color: var(--text2);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.share-btn:hover {
    border-color: var(--gold);
    color: var(--gold)
}

/* ── PRICE ROW ── */
.price-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
}

.price-stat {
    padding: 16px 20px;
    border-right: 1px solid var(--border);
    text-align: center;
}

.price-stat:last-child {
    border-right: none
}

.ps-val {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.ps-label {
    font-size: 11px;
    color: var(--text3);
    letter-spacing: .5px
}

.ps-change {
    font-family: var(--font-mono);
    font-size: 12px;
    margin-top: 3px
}

/* ── CHART ── */
.chart-wrap {
    padding: 20px 22px 16px
}

.chart-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px
}

.chart-tab {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 5px 13px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text3);
    background: none;
    cursor: pointer;
    transition: all .2s;
    font-weight: 600;
}

.chart-tab.active {
    background: rgba(240, 180, 41, .12);
    border-color: rgba(240, 180, 41, .4);
    color: var(--gold)
}

.chart-tab:hover:not(.active) {
    border-color: var(--border2);
    color: var(--text2)
}

.chart-container {
    position: relative;
    height: 220px
}

/* ── ODDS BAR ── */
.big-odds-bar {
    padding: 0 22px 20px
}

.ob-track {
    height: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
    margin-bottom: 10px;
}

.ob-fill-yes {
    height: 100%;
    border-radius: 5px 0 0 5px;
    background: linear-gradient(90deg, var(--green2), var(--green));
    transition: width .8s ease
}

.ob-fill-no {
    height: 100%;
    border-radius: 0 5px 5px 0;
    background: linear-gradient(90deg, var(--red2), var(--red));
    float: right;
    transition: width .8s ease
}

.ob-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700
}

.ob-yes {
    color: var(--green)
}

.ob-no {
    color: var(--red)
}

.ob-sub {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text3);
    margin-top: 5px
}

/* ── TRADE PANEL ── */
.trade-panel {
    position: sticky;
    top: 74px
}

.side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.trade-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border)
}

.trade-tab {
    padding: 14px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: none;
    transition: all .2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: var(--font-body);
}

.trade-tab.yes-tab {
    color: var(--text3)
}

.trade-tab.yes-tab.active {
    color: var(--green);
    border-bottom-color: var(--green);
    background: rgba(14, 203, 129, .05)
}

.trade-tab.no-tab {
    color: var(--text3)
}

.trade-tab.no-tab.active {
    color: var(--red);
    border-bottom-color: var(--red);
    background: rgba(246, 70, 93, .05)
}

.trade-body {
    padding: 18px 18px 20px
}

.t-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 7px;
    display: block;
}

/* Amount input */
.amt-wrap {
    position: relative;
    margin-bottom: 14px
}

.amt-prefix {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text2);
    border-right: 1px solid var(--border);
    background: rgba(255, 255, 255, .03);
    border-radius: 10px 0 0 10px;
}

.amt-input {
    width: 100%;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border2);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    padding: 13px 14px 13px 80px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.amt-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240, 180, 41, .1)
}

.amt-input::placeholder {
    color: var(--text3);
    font-size: 16px
}

/* Quick amount chips */
.quick-chips {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap
}

.chip {
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 5px 11px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text2);
    cursor: pointer;
    transition: all .2s;
    font-weight: 600;
}

.chip:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(240, 180, 41, .08)
}

.chip.active {
    background: rgba(240, 180, 41, .12);
    border-color: rgba(240, 180, 41, .4);
    color: var(--gold)
}

/* Trade summary */
.trade-summary {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.ts-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
}

.ts-label {
    color: var(--text3)
}

.ts-val {
    font-family: var(--font-mono);
    font-weight: 600
}

.ts-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0
}

.ts-total {
    font-size: 14px;
    font-weight: 700
}

.ts-total .ts-val {
    font-size: 16px
}

/* Submit */
.btn-trade-yes {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--green2), var(--green));
    color: #000;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 15px;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-trade-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 203, 129, .3)
}

.btn-trade-no {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red2), var(--red));
    color: #fff;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 15px;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-trade-no:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(246, 70, 93, .3)
}

.trade-notice {
    font-size: 11px;
    color: var(--text3);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

/* My position */
.my-position {
    background: rgba(14, 203, 129, .06);
    border: 1px solid rgba(14, 203, 129, .2);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 4px;
}

.mp-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 10px
}

.mp-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px
}

.mp-row:last-child {
    margin-bottom: 0
}

.mp-k {
    color: var(--text2)
}

.mp-v {
    font-family: var(--font-mono);
    font-weight: 700
}

/* ── STATS GRID ── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

.stat-cell {
    background: var(--card);
    padding: 14px 18px;
}

.sc-label {
    font-size: 11px;
    color: var(--text3);
    margin-bottom: 4px
}

.sc-val {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700
}

/* ── ACTIVITY FEED ── */
.activity-list {
    max-height: 380px;
    overflow-y: auto
}

.activity-list::-webkit-scrollbar {
    width: 3px
}

.activity-list::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 2px
}

.act-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.act-item:last-child {
    border-bottom: none
}

.act-item:hover {
    background: rgba(255, 255, 255, .02)
}

.act-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.act-content {
    flex: 1;
    min-width: 0
}

.act-top {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px
}

.act-user {
    font-size: 13px;
    font-weight: 700
}

.act-action {
    font-size: 13px;
    color: var(--text2)
}

.act-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-yes {
    background: rgba(14, 203, 129, .2);
    color: var(--green)
}

.badge-no {
    background: rgba(246, 70, 93, .2);
    color: var(--red)
}

.act-meta {
    font-size: 11px;
    color: var(--text3)
}

.act-amount {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    margin-left: auto
}

/* ── RESOLUTION INFO ── */
.resolution-box {
    background: rgba(240, 180, 41, .05);
    border: 1px solid rgba(240, 180, 41, .2);
    border-radius: 12px;
    padding: 16px 18px;
}

.rb-title {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px
}

.rb-text {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.65
}

.rb-source {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text3);
}

.rb-source a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600
}

.rb-source a:hover {
    text-decoration: underline
}

/* ── RELATED MARKETS ── */
.rel-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    background: var(--bg3);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}

.rel-card:hover {
    border-color: rgba(240, 180, 41, .3);
    transform: translateX(4px)
}

.rel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0
}

.rel-q {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    line-height: 1.4
}

.rel-pct {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap
}

/* ── DESCRIPTION ── */
.desc-text {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.75
}

.desc-text p {
    margin-bottom: 12px
}

.desc-text p:last-child {
    margin-bottom: 0
}

/* ── TOAST ── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.toast-item {
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    max-width: 320px;
    animation: toastIn .3s ease both;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0)
    }

    to {
        opacity: 0;
        transform: translateY(12px)
    }
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0
}

.toast-msg strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px
}

.toast-msg span {
    color: var(--text2)
}

/* ── LIVE PULSE ── */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--green);
    background: rgba(14, 203, 129, .1);
    border: 1px solid rgba(14, 203, 129, .25);
    padding: 3px 10px;
    border-radius: 100px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 1.5s ease-in-out infinite
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .4;
        transform: scale(.7)
    }
}

/* ── FADE IN ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.fade-up {
    animation: fadeUp .5s ease both
}

.d1 {
    animation-delay: .05s
}

.d2 {
    animation-delay: .1s
}

.d3 {
    animation-delay: .15s
}

.d4 {
    animation-delay: .2s
}

/* ── RESPONSIVE ── */
@media(max-width:960px) {
    .page-grid {
        grid-template-columns: 1fr;
        padding: 16px
    }

    .side-col {
        grid-column: 1
    }

    .trade-panel {
        position: static
    }

    .price-row {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:600px) {
    .price-row {
        grid-template-columns: 1fr 1fr
    }

    .mkt-header {
        padding: 18px 18px 14px
    }
}