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

/* [data-theme="light"] blocks removed */

:root {
    /* Dark Theme (Default) */
    --bg-dark: #050505;
    --bg-card: #0F0F0F;
    --accent-red: #FF2E2E;
    --accent-blue: #2E8FFF;
    --text-primary: #FFFFFF;
    --text-secondary: #888888;
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --grid-line: rgba(255, 255, 255, 0.03);

    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    /* Tech Grid Background */
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
    padding-bottom: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Legal Footer */
.legal-footer {
    padding: 3rem 0;
    margin-top: auto;
    border-top: var(--glass-border);
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(10px);
    text-align: center;
}

.legal-footer p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.legal-footer p:last-child {
    margin-bottom: 0;
    opacity: 0.8;
}

/* Header */
.main-header {
    padding: 1.5rem 0;
    border-bottom: var(--glass-border);
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    position: relative;
}

/* 
.logo::after {
  content: 'v2.0';
  font-size: 0.6rem;
  background: var(--accent-red);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  transform: translateY(-5px);
} 
*/

.data-source {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    border: var(--glass-border);
    padding: 0.5em 1em;
    border-radius: 99px;
    transition: all 0.2s ease;
}

.data-source:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Main Layout */
.main-content {
    flex: 1;
    padding: 2rem 0;
    /* Reduced vertical padding */
}

.container {
    max-width: 1800px;
    /* Nearly full width for large screens */
    width: 98%;
    /* Push to edges */
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Fixed: Reduced from 500px to avoid overflow */
    gap: 1.5rem;
    /* Reduced grid gap */
}

.mode-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.mode-icon {
    font-size: 1.25rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* Layout Containers */
.cards-split {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Tighter gap between Current and Next */
}

/* Card System */
.card {
    position: relative;
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}



.current-card {
    height: 500px;
    /* Heroic height */
    justify-content: flex-end;
}

.next-card {
    height: 220px;
    /* Substantial height for next map */
    justify-content: flex-end;
    background: var(--bg-card);
}

.current-card:hover,
.next-card:hover {
    /* Hover effect for both */
    transform: scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 0;
}



.card:hover .card-bg {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.6) 40%, rgba(5, 5, 5, 0.2) 100%);
    z-index: 1;
}

.card-body {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    color: #FFFFFF;
    /* Always white text on cards because of dark overlay */
}

/* Ensure specific text elements in card stay white */
.card .map-title,
.card .timer-display,
.card .status-indicator {
    color: #FFFFFF;
}

/* Allow ltm-type to use its own color (blue) */
.card .ltm-type {
    color: var(--accent-blue) !important;
}

/* Override for Next Card details which might have inherited grey */
.next-info,
.next-ltm-name {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Specific body tweaks */
.next-card .card-body {
    padding: 1.5rem 2rem;
    flex-direction: row;
    /* Horizontal alignment for next card content */
    align-items: center;
    justify-content: space-between;
}

/* Typography & Elements */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: auto;
    /* Push to top */
    backdrop-filter: blur(4px);
    width: fit-content;
    /* Ensure it only takes needed space */
}

.status-indicator.live {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-indicator.next {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-indicator.live .dot {
    box-shadow: 0 0 8px currentColor;
    animation: pulse 2s infinite;
}

.map-title {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 0.25em;
    text-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.map-title-small {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Timer Design */
.timer-display {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timer-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.digital-clock {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(180deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    width: fit-content;
}

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

.next-info .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.next-info .value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Main Layout */
.main-content {
    flex: 1;
    padding: 4rem 0 2rem 0;
    /* Increased top padding as requested */
}

/* Map Details Override */
.map-hero-image {
    height: 500px;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cards-split {
        grid-template-columns: 1fr;
    }

    /* Stack on mobile */
    .current-card,
    .next-card {
        height: 280px;
    }

    .map-title {
        font-size: 2rem;
    }

    .next-card .card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .next-info {
        text-align: left;
    }
}

/* LTM Specific Styles */
.ltm-header-text {
    display: flex;
    flex-direction: column;
}

.ltm-event-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    /* Back to white as requested */
    text-transform: uppercase;
    line-height: 1;
    margin-top: -5px;
}

.ltm-type {
    font-family: var(--font-mono);
    color: var(--accent-blue);
    /* Ensure this is accent-blue */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    /* Increased from 0.9rem */
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.next-details {
    display: flex;
    flex-direction: column;
}

.next-ltm-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

/* #ltm-section header overrides removed to match standard grey style */