:root {
    --bg-dark: #020713;
    --panel-dark: #040c1e;
    --panel-border: #162444;
    --gold-primary: #f6c039;
    --gold-light: #fce881;
    --gold-gradient: linear-gradient(135deg, #fbe277 0%, #d4951d 50%, #99680c 100%);
    --neon-blue: #00d2ff;
    --neon-blue-glow: 0 0 15px rgba(0, 210, 255, 0.45);
    --gold-glow: 0 0 18px rgba(246, 192, 57, 0.4);
    --green-live: #00e676;
    --text-muted: #8b9bb4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at 50% 20%, #08132e 0%, #020713 100%);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* NAVBAR */
.tmla-top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: rgba(3, 10, 26, 0.95);
    border-bottom: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-crest {
    font-size: 32px;
    filter: drop-shadow(0 0 8px rgba(246, 192, 57, 0.7));
}
.brand-acronym {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}
.brand-subtitle {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #e5a720;
}

.tmla-nav-links {
    display: flex;
    gap: 8px;
}
.tmla-nav-links .nav-item {
    color: #c0cdf0;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}
.tmla-nav-links .nav-item.active,
.tmla-nav-links .nav-item:hover {
    background: #0f1c3d;
    color: var(--gold-primary);
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-sound-toggle {
    background: #0d1e44;
    border: 1px solid #204185;
    color: #ffd700;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.btn-telegram-header {
    background: linear-gradient(135deg, #0088cc 0%, #005f9e 100%);
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}
.tg-text strong {
    display: block;
    font-size: 12px;
}
.tg-text span {
    font-size: 9px;
    opacity: 0.85;
}

/* ARENA 3D DASHBOARD */
.dashboard-wrapper {
    max-width: 1540px;
    margin: 20px auto;
    padding: 0 16px;
}
.arena-grid {
    display: grid;
    grid-template-columns: 290px 1fr 310px;
    gap: 18px;
}

.hud-panel {
    background: var(--panel-dark);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.hud-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ced9ee;
    margin-bottom: 12px;
}

/* Schedule List */
.schedule-slot {
    display: flex;
    align-items: center;
    background: #06112a;
    border: 1px solid #142247;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.slot-active {
    border-color: var(--gold-primary);
    box-shadow: 0 0 10px rgba(246, 192, 57, 0.2);
}
.slot-price {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--gold-primary);
    min-width: 60px;
}
.slot-times {
    flex: 1;
}
.slot-window {
    font-size: 11px;
    font-weight: 600;
}
.slot-res {
    font-size: 10px;
    color: var(--text-muted);
}
.status-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}
.badge-live {
    background: #09371e;
    color: var(--green-live);
    border: 1px solid #00e676;
}
.badge-upcoming {
    background: #101c3a;
    color: #6a82b4;
    border: 1px solid #203565;
}

/* Status Indicator */
.status-indicator-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green-live);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--green-live);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green-live);
}
.status-headline {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #00ff88;
}
.status-subline {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* REMAINING COUNTDOWN TIMER */
.countdown-container {
    background: linear-gradient(180deg, #071536 0%, #030a1c 100%);
    border: 1px solid #1c3d7a;
    border-radius: 10px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    box-shadow: inset 0 0 12px rgba(0, 210, 255, 0.15);
}
.countdown-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.countdown-clock {
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #00d2ff;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
}

.hud-meta-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
}
.meta-label {
    font-size: 10px;
    color: var(--text-muted);
}
.meta-val {
    font-family: 'Rajdhani', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}

.btn-primary-telegram {
    display: block;
    background: linear-gradient(135deg, #0099ff 0%, #0066cc 100%);
    color: #fff;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 153, 255, 0.4);
}

/* 3D MARQUEE STAGE */
.stage-3d-chassis {
    background: radial-gradient(circle at 50% 30%, #0a1c42 0%, #020715 90%);
    border: 2px solid #caa038;
    border-radius: 20px;
    padding: 24px 18px;
    box-shadow: 0 0 35px rgba(202, 160, 56, 0.25), inset 0 0 20px rgba(0, 210, 255, 0.15);
    text-align: center;
}
.stage-crown-marquee .crown-icon {
    font-size: 38px;
}
.stage-crown-marquee .marquee-title {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stage-crown-marquee .marquee-sub {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.ticket-grid-matrix {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 18px auto;
    max-width: 620px;
}
.matrix-cell {
    background: #06122d;
    border: 1px solid #142754;
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.15s, border-color 0.15s;
}
.matrix-cell .cell-series {
    font-size: 9px;
    color: #7b92bd;
    font-weight: 600;
}
.matrix-cell .cell-num {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #d8e5ff;
}
.matrix-cell.active-cell {
    border: 2px solid var(--gold-primary);
    background: #1c270b;
    box-shadow: var(--gold-glow);
    transform: scale(1.05);
}
.matrix-cell.active-cell .cell-num {
    color: var(--gold-primary);
}
.winner-pulse {
    animation: winPulseAnim 0.7s infinite alternate ease-in-out !important;
    border: 2px solid #00ff88 !important;
    background: #092e16 !important;
}
@keyframes winPulseAnim {
    from { transform: scale(1.05); box-shadow: 0 0 15px rgba(0, 255, 136, 0.5); }
    to { transform: scale(1.15); box-shadow: 0 0 30px rgba(0, 255, 136, 0.9); }
}

.stage-ribbon-podium {
    margin-top: 14px;
    background: #030b1c;
    border: 1px solid #c99c37;
    border-radius: 12px;
    padding: 8px 24px;
    display: inline-block;
}
.ribbon-spinner-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 1px;
}
.ribbon-active-ticket {
    font-family: 'Rajdhani', sans-serif;
    font-size: 26px;
    font-weight: 900;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bracket-glow {
    color: var(--gold-primary);
}

/* RANKS BOARD */
.ranks-card-header .ranks-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--gold-primary);
}
.ranks-meta-chips {
    display: flex;
    gap: 6px;
    margin: 8px 0;
    font-size: 10px;
    color: var(--text-muted);
}
.ranks-selection-banner {
    background: #0a1c44;
    border: 1px solid #1c3977;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #8bb2ff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.rank-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid #0d1a3a;
    font-family: 'Rajdhani', sans-serif;
}
.rank-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 12px;
}
.rank-1 { background: #d4951d; color: #000; }
.rank-2 { background: #8e9bb0; color: #000; }
.rank-3 { background: #8e5828; color: #fff; }
.rank-ticket-val {
    font-weight: 700;
    font-size: 15px;
}
.rank-prize {
    color: var(--gold-primary);
    font-weight: 800;
    font-size: 14px;
}

/* BOTTOM SECTION */
.bottom-results-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 18px;
    margin-top: 20px;
}
.recent-results-panel, .check-ticket-panel {
    background: var(--panel-dark);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 16px;
}
.panel-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.results-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.res-card {
    background: #06112a;
    border: 1px solid #14244c;
    border-radius: 10px;
    padding: 12px;
}
.res-card-top {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--gold-primary);
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.res-winner-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    font-family: 'Rajdhani', sans-serif;
}
.btn-card-details {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #6a95e2;
    text-decoration: none;
    margin-top: 8px;
}

/* CHECK TICKET FORM */
.check-ticket-form .input-wrap input {
    width: 100%;
    background: #020713;
    border: 1px solid #1c3260;
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 10px;
}
.btn-check-submit {
    width: 100%;
    background: var(--gold-gradient);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(246, 192, 57, 0.4);
}

.tmla-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--panel-border);
    margin-top: 40px;
}

/* 📱 MOBILE RESPONSIVENESS */
@media (max-width: 992px) {
    .dashboard-wrapper {
        padding: 0 8px;
        margin: 10px auto;
    }
    .arena-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    .arena-col.center-stage {
        order: 1;
    }
    .arena-col.left-hud {
        order: 2;
    }
    .arena-col.right-hud {
        order: 3;
    }
    .ticket-grid-matrix {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 4px !important;
        max-width: 100% !important;
    }
    .matrix-cell {
        padding: 6px 2px !important;
    }
    .matrix-cell .cell-series {
        font-size: 7.5px !important;
    }
    .matrix-cell .cell-num {
        font-size: 14px !important;
    }
    .stage-crown-marquee .marquee-title {
        font-size: 24px !important;
    }
    .ribbon-active-ticket {
        font-size: 20px !important;
    }
    .tmla-top-navbar {
        padding: 10px 14px;
        flex-direction: column;
        gap: 10px;
    }
    .tmla-nav-links {
        overflow-x: auto;
        width: 100%;
        padding-bottom: 4px;
    }
    .header-right-actions {
        width: 100%;
        justify-content: space-between;
    }
    .btn-telegram-header {
        flex: 1;
        justify-content: center;
    }
    .bottom-results-grid {
        display: flex;
        flex-direction: column;
    }
    .results-cards-container {
        grid-template-columns: 1fr !important;
    }
}