/* ═══════════════════════════════════════════════════════════════
   TGE Launch Prediction Markets — Token Radar
   ═══════════════════════════════════════════════════════════════ */

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

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

.tge-hero {
    text-align: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 207, 255, 0.1);
    margin-bottom: 1rem;
}
.tge-hero-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 0.25rem;
}
.tge-hero-sub {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    font-family: 'JetBrains Mono', monospace;
}

/* ── Market Cards Grid ─────────────────────────────────────────── */

.tge-markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
    padding: 0 0.5rem;
}

.tge-market-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.tge-market-card:hover {
    border-color: rgba(0, 207, 255, 0.4);
    transform: translateY(-2px);
}

.tge-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.tge-card-symbol {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.1rem;
    color: #00cfff;
    background: rgba(0, 207, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}
.tge-card-name {
    font-size: 0.9rem;
    color: #fff;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tge-card-counter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
    font-family: 'JetBrains Mono', monospace;
}
.tge-cd-label-header {
    width: 100%;
    text-align: center;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(0, 207, 255, 0.7);
    margin-bottom: 0.1rem;
    font-weight: 600;
}
.tge-card-counter .tge-cd-seg {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 38px;
    background: rgba(0, 207, 255, 0.06);
    border: 1px solid rgba(0, 207, 255, 0.15);
    border-radius: 6px;
    padding: 0.3rem 0.25rem 0.2rem;
}
.tge-card-counter .tge-cd-num {
    font-size: 0.95rem;
    font-weight: 700;
    color: #00cfff;
    line-height: 1;
}
.tge-card-counter .tge-cd-label {
    font-size: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}
.tge-card-counter .tge-cd-resolved {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
}
.tge-card-counter .tge-cd-resolving {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff4444;
    padding: 0.25rem 0.75rem;
}

.tge-card-status {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 0.6rem;
    display: inline-block;
    width: 100%;
}
.tge-card-status.active {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
}
.tge-card-status.resolved {
    color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.tge-card-desc {
    font-size: 0.72rem;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.tge-card-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.tge-card-meta-item {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.tge-card-meta-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0,207,255,0.5);
    font-weight: 600;
}

.tge-card-links {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.tge-card-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: #00cfff;
    text-decoration: none;
    padding: 0.15rem 0.5rem;
    border: 1px solid rgba(0, 207, 255, 0.2);
    border-radius: 4px;
    transition: all 0.15s;
}
.tge-card-link:hover {
    background: rgba(0, 207, 255, 0.1);
    border-color: rgba(0, 207, 255, 0.4);
}
.tge-share-link {
    color: #fff;
    background: rgba(0, 207, 255, 0.12);
    border-color: rgba(0, 207, 255, 0.35);
}
.tge-share-link:hover {
    background: rgba(0, 207, 255, 0.25);
    border-color: #00cfff;
}

.tge-token-info {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
}
.tge-token-summary {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}
.tge-info-badges {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.tge-info-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
}

.tge-card-question {
    font-size: 0.8rem;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.tge-card-prices {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.tge-card-price-pill {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
}
.tge-card-price-pill.yes {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: #00ff88;
}
.tge-card-price-pill.no {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.2);
    color: #ff4444;
}
.tge-card-price-label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 0.15rem;
}

.tge-card-timer {
    font-size: 0.7rem;
    color: rgba(0, 207, 255, 0.6);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.tge-card-countdown {
    display: contents;
}

/* ── Single Market Trading View ────────────────────────────────── */

.tge-trading-view {
    display: none;
}
.tge-trading-view.active {
    display: block;
}

.tge-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #00cfff;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    background: none;
    border: none;
}
.tge-back-btn:hover { opacity: 0.8; }

.tge-market-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 150, 255, 0.1);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.tge-market-symbol-big {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.8rem;
    color: #00cfff;
}
.tge-market-title-area {
    flex: 1;
}
.tge-market-title {
    font-size: 1rem;
    color: #fff;
    margin: 0;
}
.tge-market-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin: 0.25rem 0 0;
}

.tge-market-countdown {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: #00ff88;
    text-align: right;
}
.tge-market-countdown-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    display: block;
}

/* ── Trading Panels Layout ─────────────────────────────────────── */

.tge-trading-panels {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
}

@media (max-width: 800px) {
    .tge-trading-panels {
        grid-template-columns: 1fr;
    }
}

/* ── Probability Bars ──────────────────────────────────────────── */

.tge-prob-section {
    margin-bottom: 1rem;
}
.tge-prob-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    cursor: pointer;
    transition: opacity 0.2s;
}
.tge-prob-row:hover { opacity: 0.85; }
.tge-prob-label {
    font-size: 0.85rem;
    font-weight: 600;
    width: 36px;
}
.tge-prob-label.yes { color: #00ff88; }
.tge-prob-label.no { color: #ff4444; }

.tge-prob-bar-track {
    flex: 1;
    height: 28px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.tge-prob-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}
.tge-prob-bar-fill.yes { background: rgba(0, 255, 136, 0.25); }
.tge-prob-bar-fill.no { background: rgba(255, 68, 68, 0.25); }

.tge-prob-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 50px;
    text-align: right;
}

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

.tge-orderbook {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}
.tge-ob-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.tge-ob-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
}
.tge-ob-tabs {
    display: flex;
    gap: 0.25rem;
}
.tge-ob-tab {
    font-size: 0.75rem;
    padding: 0.6rem 1.4rem;
    min-height: 48px;
    min-width: 48px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
}
.tge-ob-tab.active {
    border-color: #00cfff;
    color: #00cfff;
    background: rgba(0, 207, 255, 0.1);
}

.tge-ob-table {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
}
.tge-ob-table th {
    color: rgba(255,255,255,0.3);
    font-weight: 400;
    text-align: right;
    padding: 0.2rem 0.3rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.tge-ob-table th:first-child { text-align: left; }
.tge-ob-table td {
    padding: 0.15rem 0.3rem;
    text-align: right;
}
.tge-ob-table td:first-child { text-align: left; }
.tge-ob-asks td { color: #ff4444; }
.tge-ob-bids td { color: #00ff88; }
.tge-ob-spread {
    text-align: center;
    color: rgba(255,255,255,0.3);
    padding: 0.25rem;
    font-size: 0.65rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ── Trade Entry ───────────────────────────────────────────────── */

.tge-trade-panel {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 10px;
    padding: 1rem;
}
.tge-trade-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.75rem;
}

.tge-outcome-btns {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.tge-outcome-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
}
.tge-outcome-btn.yes.active {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}
.tge-outcome-btn.no.active {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.tge-trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.tge-trade-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}
.tge-trade-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 100px;
    text-align: right;
}
.tge-trade-input:focus {
    outline: none;
    border-color: #00cfff;
}

.tge-quick-amounts {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1rem;
}
.tge-quick-btn {
    flex: 1;
    padding: 0.3rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    transition: all 0.15s;
}
.tge-quick-btn:hover {
    border-color: #00cfff;
    color: #00cfff;
}

.tge-payout-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.3rem;
}
.tge-payout-value {
    color: #00ff88;
    font-family: 'JetBrains Mono', monospace;
}

.tge-submit-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin-top: 0.5rem;
}
.tge-submit-btn.yes {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}
.tge-submit-btn.no {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(255, 68, 68, 0.1));
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}
.tge-submit-btn:hover { filter: brightness(1.2); }
.tge-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: none;
}

.tge-trade-status {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    min-height: 1.5rem;
}

/* ── Positions & Orders ────────────────────────────────────────── */

.tge-positions-panel {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem;
    margin-top: 1rem;
}
.tge-panel-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.5rem;
}
.tge-positions-table {
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}
.tge-positions-table th {
    color: rgba(255,255,255,0.3);
    font-weight: 400;
    text-align: left;
    padding: 0.25rem 0.4rem;
    font-size: 0.6rem;
    text-transform: uppercase;
}
.tge-positions-table td {
    padding: 0.3rem 0.4rem;
    color: rgba(255,255,255,0.7);
}

/* ── Recent Trades ─────────────────────────────────────────────── */

.tge-trades-panel {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 10px;
    padding: 0.75rem;
    margin-top: 1rem;
}

/* ── Empty / Loading ───────────────────────────────────────────── */

.tge-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    padding: 2rem;
}
.tge-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: tge-shimmer 1.5s infinite;
    border-radius: 6px;
    height: 1rem;
    margin: 0.3rem 0;
}
@keyframes tge-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Price info badges ─────────────────────────────────────────── */

.tge-price-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.tge-price-badge {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 150, 255, 0.15);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    flex: 1;
    min-width: 120px;
}
.tge-price-badge-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.2rem;
}
.tge-price-badge-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #00cfff;
}

/* ── Resolved state ────────────────────────────────────────────── */

.tge-resolved-banner {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}
.tge-resolved-winner {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.2rem;
    color: #00ff88;
}
.tge-resolved-detail {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.3rem;
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 600px) {
    .tge-markets-grid {
        grid-template-columns: 1fr;
        padding: 0 0.25rem;
    }
    .tge-market-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .tge-market-countdown {
        text-align: left;
    }
    .tge-container {
        padding: 0.5rem 0 1.5rem;
    }
    .tge-hero {
        padding: 1rem 0.5rem;
    }
    .tge-hero-title {
        font-size: 1.2rem;
    }
    .tge-card-link {
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
    }
    .tge-card-counter .tge-cd-seg {
        min-width: 32px;
        padding: 0.2rem 0.15rem;
    }
    .tge-card-counter .tge-cd-num {
        font-size: 0.85rem;
    }
    .tge-trading-panels {
        grid-template-columns: 1fr;
    }
    .tge-prob-bar-track {
        height: 36px;
    }
    .tge-back-btn {
        min-height: 44px;
    }
    .tge-card-prices {
        gap: 0.35rem;
    }
    .tge-card-price-pill {
        font-size: 0.75rem;
        padding: 0.4rem 0.3rem;
    }
    .tge-quick-btn {
        min-height: 44px;
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }
}

/* ── Blue Submit Button (Yes = Blue) ── */
.tge-submit-btn.tge-submit-blue {
    background: rgba(0, 207, 255, 0.15);
    border-color: rgba(0, 207, 255, 0.4);
    color: #00cfff;
}
.tge-submit-btn.tge-submit-blue:hover {
    background: rgba(0, 207, 255, 0.25);
    border-color: #00cfff;
    box-shadow: 0 0 12px rgba(0, 207, 255, 0.2);
}

/* ── Chart Timeframe Buttons ── */
.tge-chart-tf {
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(0,150,255,0.2);
    border-radius: 4px;
    background: transparent;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.15s;
}
.tge-chart-tf:hover {
    color: #00cfff;
    border-color: rgba(0,207,255,0.4);
}
.tge-chart-tf.active {
    background: rgba(0,207,255,0.15);
    color: #00cfff;
    border-color: rgba(0,207,255,0.4);
}
