@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --color-fons: #000000;
    --color-secundari: #87d1ff;
    --color-accent: #fcd234;
    --blanc: #ffffff;
    --gris-fons: #121212;
    --border-color: #2a2a2a;
    --tipus-lletra: 'IBM Plex Mono', monospace;
    --font-ui: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body, html {
    height: 100%; margin: 0; padding: 0;
    background-color: var(--color-fons);
    font-family: var(--tipus-lletra);
    overflow: hidden;
    color: var(--blanc);
}

.airport-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
}

/* CAPÇALERA AMB FONS BLANC */
.main-header {
    background-color: #ffffff;
    padding: 0 16px;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
    font-family: var(--font-ui);
    color: #000000;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.logo-aeroport,
.header-brand svg {
    height: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    display: block;
}

.header-title {
    font-size: clamp(1rem, 3.5vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 2px;
    color: #000000;
    margin: 0;
    font-family: var(--font-ui);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
}

.clock {
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    color: #000000;
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.15);
    font-family: var(--font-ui);
    font-weight: 600;
}

.logo-blancs-subtle {
    height: clamp(18px, 3vw, 26px);
    opacity: 0.6;
    transition: opacity 0.2s;
}

.logo-blancs-subtle:hover { opacity: 1; }

/* CONTENIDOR TAULA */
.board-container {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.board-container::-webkit-scrollbar { display: none; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }

th {
    background-color: var(--color-secundari);
    color: var(--color-fons);
    text-align: left;
    padding: 10px 8px;
    font-size: clamp(0.7rem, 2vw, 1.1rem);
    position: sticky; top: 0; z-index: 10;
}

td {
    padding: 10px 8px;
    font-size: clamp(0.7rem, 2vw, 1.1rem);
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.col-airline { width: 18%; }
.col-code    { width: 12%; }
.col-desti   { width: 30%; }
.col-time    { width: 10%; }
.col-gate    { width: 18%; }
.col-state   { width: 12%; }

#flightBody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
#flightBody tr:hover { background: rgba(252, 210, 52, 0.15) !important; cursor: pointer; }

.glow { text-shadow: 0 0 6px rgba(135, 209, 255, 0.4); }
.green-glow { color: #8ef8b9; text-shadow: 0 0 6px rgba(142, 248, 185, 0.4); }

/* BARRA NAVEGACIÓ INFERIOR (UX MÒBIL) */
.bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0d0d0d;
    border-top: 1px solid var(--border-color);
    padding: 8px 12px;
    gap: 8px;
    flex-shrink: 0;
    font-family: var(--font-ui);
    color: var(--blanc);
}

.day-display {
    font-size: clamp(0.85rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: var(--blanc);
    text-align: center;
    flex-grow: 1;
    font-family: var(--font-ui);
}

.nav-btn {
    background: var(--gris-fons);
    border: 1px solid var(--border-color);
    color: var(--blanc);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-ui);
}
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.info-btn {
    background: var(--blanc);
    color: var(--color-fons);
    border: none;
    font-weight: bold;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    font-family: var(--font-ui);
}

/* MARQUEE */
.marquee-container { overflow: hidden; width: 100%; }
.marquee-wrapper { display: inline-block; }
.animate-marquee { animation: marquee-scroll 10s linear infinite; }
@keyframes marquee-scroll {
    0%, 20% { transform: translateX(0); }
    90%, 100% { transform: translateX(calc(-100% + 80px)); }
}

/* MODALS */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card {
    background: #141414; border: 1px solid var(--border-color);
    border-radius: 12px; width: 90%; max-width: 500px;
    max-height: 80vh; overflow-y: auto; padding: 20px; position: relative;
    font-family: var(--font-ui);
}
.close-btn { position: absolute; top: 10px; right: 15px; background: none; border: none; color: var(--blanc); font-size: 1.5rem; }
.modal-header-title { color: var(--blanc); font-weight: bold; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; margin-bottom: 12px; }
.modal-field { margin-bottom: 10px; }
.modal-field-label { font-size: 0.75rem; color: #888; text-transform: uppercase; }
.modal-field-value { font-size: 0.95rem; }
.info-tip-box { background: rgba(255,255,255,0.04); padding: 10px; border-radius: 6px; margin-bottom: 10px; }
.info-tip-title { color: var(--blanc); font-weight: bold; margin-bottom: 4px; }