/*
Theme Name: War2026 Command Dashboard
Author: Antigravity
Description: A premium, dark-mode real-time dashboard.
Version: 1.1
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

:root {
    --bg-dark: #07090f;
    --card-bg: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-red: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.2);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-gradient-1: #e2e8f0;
    --bg-gradient-2: #cbd5e1;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-glow: rgba(239, 68, 68, 0.1);
}

[data-theme="light"] header h1 {
    background: none;
    -webkit-text-fill-color: #0f172a;
    color: #0f172a;
}

[data-theme="light"] input[type="text"] {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] input[type="text"]::placeholder {
    color: var(--text-muted);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at top right, var(--bg-gradient-1, #1e293b) 0%, transparent 40%),
        radial-gradient(circle at bottom left, var(--bg-gradient-2, #0f172a) 0%, transparent 40%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    padding: 1.5rem;
}

/* ========== HEADER ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--accent-glow);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-red);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* ========== LAYOUT ROWS ========== */
.row {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.row-1 {
    grid-template-columns: 1fr 2fr 1fr;
}

.row-2 {
    grid-template-columns: 1fr 1fr;
}

.row-3 {
    grid-template-columns: repeat(4, 1fr);
}

.row-charts-ad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ========== CARD ========== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.col-span-2 {
    grid-column: span 2;
}

/* ========== AD BANNER ========== */
.ad-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    min-height: 200px;
}

.ad-banner img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.ad-banner-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== NEWS SECTION ========== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 8px;
}

.news-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.news-item:last-child {
    border-bottom: none;
}

.news-time {
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.news-headline {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
}

.news-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* ========== MINI CHART CARD ========== */
.chart-card {
    padding: 1rem;
}

.chart-card .card-title {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.chart-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.chart-change {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
}

.change-up {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
}

.change-down {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

/* Range Selector Buttons */
.range-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.range-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.range-btn.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

[data-theme="light"] .range-btn {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .range-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* ========== AIRPORT HEATMAP LIST ========== */
.airport-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.airport-list::-webkit-scrollbar {
    width: 6px;
}

.airport-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.airport-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

[data-theme="light"] .airport-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

/* Re-use for news scroll */
.news-list::-webkit-scrollbar {
    width: 6px;
}

.news-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.news-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.airport-row {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    font-size: 0.9rem;
    align-items: center;
    transition: background 0.2s;
}

.airport-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .airport-row {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .airport-row:hover {
    background: rgba(0, 0, 0, 0.06);
}

.airport-row.header {
    background: transparent !important;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    padding-top: 0px;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
}

.text-right {
    text-align: right;
}

.text-red {
    color: var(--accent-red);
}

.text-green {
    color: var(--accent-green);
}

.heat-low {
    background-color: rgba(16, 185, 129, 0.05);
    border-left: 4px solid var(--accent-green);
}

.heat-med {
    background-color: rgba(251, 191, 36, 0.05);
    border-left: 4px solid #fbbf24;
}

.heat-high {
    background-color: rgba(239, 68, 68, 0.08);
    border-left: 4px solid var(--accent-red);
}

.hidden-row {
    display: none !important;
}

/* Statistics Typography */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.giant-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent-red);
    display: block;
    margin: 1rem 0;
}

/* ========== INPUT ========== */
input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* ========== FOOTER ========== */
.site-footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.site-footer a {
    color: var(--accent-blue);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-disclaimer {
    max-width: 600px;
    margin: 0 auto 8px auto;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .row-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .row-charts-ad {
        grid-template-columns: repeat(2, 1fr);
    }

    .row-charts-ad .ad-banner {
        grid-column: span 2 !important;
        grid-row: auto !important;
    }
}

@media (max-width: 900px) {

    .row-1,
    .row-2,
    .row-3,
    .row-charts-ad {
        grid-template-columns: 1fr;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .row-charts-ad .ad-banner {
        grid-column: span 1 !important;
        grid-row: auto !important;
    }

    header h1 {
        font-size: 1.3rem;
    }

    body {
        padding: 1rem;
    }

    .ad-banner {
        min-height: 120px;
    }
}