html {
    background-color: #030712;
}

/* Fallback: content visible even when Tailwind CDN fails to load */
.animate-fade-up {
    opacity: 1 !important;
    animation: fadeUp 0.55s ease-out both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    position: relative;
    min-height: 100vh;
    background-color: #030712;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 45% at 50% -5%, rgba(16, 185, 129, 0.22), transparent 65%),
        radial-gradient(ellipse 45% 35% at 100% 10%, rgba(34, 211, 238, 0.14), transparent 70%),
        radial-gradient(ellipse 40% 30% at 0% 90%, rgba(99, 102, 241, 0.12), transparent 70%),
        #030712;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
}

.glass {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(14px);
}

.glow-live {
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25), 0 0 24px rgba(16, 185, 129, 0.12);
}

.glow-stale {
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2), 0 0 16px rgba(251, 191, 36, 0.08);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-pill::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
}

.status-live {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-live::before {
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: pulse-dot 2s ease-out infinite;
}

.status-stale {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-stale::before {
    background: #fbbf24;
}

.status-offline,
.status-unknown {
    color: #94a3b8;
    background: rgba(100, 116, 139, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.status-offline::before,
.status-unknown::before {
    background: #64748b;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 129, 0); }
}

#map {
    height: 420px;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.leaflet-container {
    background: #0f172a;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.station-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.station-card:hover {
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.28);
}

.station-card.is-active {
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2), 0 12px 32px rgba(0, 0, 0, 0.25);
}

.stat-value {
    font-variant-numeric: tabular-nums;
}

.phg-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.phg-ring svg {
    transform: rotate(-90deg);
}

.message-row {
    border-left: 2px solid rgba(34, 211, 238, 0.35);
    padding-left: 0.85rem;
}

.path-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: #cbd5e1;
}

.telemetry-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    background: rgba(15, 118, 110, 0.15);
    border: 1px solid rgba(45, 212, 191, 0.2);
    color: #99f6e4;
}

.loading-shimmer {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.5) 0%, rgba(51, 65, 85, 0.8) 50%, rgba(30, 41, 59, 0.5) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.scanline {
    position: relative;
    overflow: hidden;
}

.scanline::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(transparent 0%, rgba(16, 185, 129, 0.03) 50%, transparent 100%);
    background-size: 100% 6px;
    animation: scan 8s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 200%; }
}

.fleet-arc {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

@media (max-width: 768px) {
    #map {
        height: 300px;
    }
}
