@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-dark: #070c18;
    --bg-surface: #0c1427;
    --bg-card: rgba(14, 23, 42, 0.75);
    --border-card: rgba(255, 255, 255, 0.08);
    --neon-cyan: #00f0ff;
    --neon-blue: #3b82f6;
    --neon-green: #10b981;
    --neon-gold: #f59e0b;
    --neon-purple: #a855f7;
    --neon-pink: #ec4899;
}

body {
    background-color: var(--bg-dark);
    color: #f1f5f9;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

.font-heading {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(11, 18, 36, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card-hover:hover {
    background: rgba(15, 25, 50, 0.85);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.2);
}

/* Glow Effects */
.glow-cyan {
    box-shadow: 0 0 25px -3px rgba(0, 240, 255, 0.4);
}
.glow-gold {
    box-shadow: 0 0 25px -3px rgba(245, 158, 11, 0.4);
}
.glow-purple {
    box-shadow: 0 0 25px -3px rgba(168, 85, 247, 0.4);
}
.glow-green {
    box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.4);
}

.text-glow-cyan {
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}
.text-glow-gold {
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

/* Map Container Styling */
#map-canvas {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #0a1329 0%, #060b17 100%);
}

/* Custom Marker Card Styling (Exact match to reference concept) */
.maplibre-marker-card {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
    will-change: transform;
}
.maplibre-marker-card:hover {
    transform: scale(1.12) translateY(-6px);
    z-index: 60 !important;
}

/* Crown Animation */
.crown-float {
    animation: crownFloat 3s ease-in-out infinite alternate;
}
@keyframes crownFloat {
    0% { transform: translateY(0px); filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.7)); }
    100% { transform: translateY(-3px); filter: drop-shadow(0 0 14px rgba(245, 158, 11, 1)); }
}

/* Bioluminescent Beacon Marker */
.map-beacon {
    position: relative;
    width: 18px;
    height: 18px;
}
.map-beacon::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: beaconWave 2s infinite ease-out;
}
.map-beacon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    box-shadow: 0 0 12px currentColor;
}

@keyframes beaconWave {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Tactical Hover HUD */
.map-tactical-hud {
    position: fixed;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -125%);
    transition: opacity 0.12s ease;
}

/* Tactical Territory Drawer */
#map-territory-drawer {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.pulsing-emblem {
    animation: pulseGlow 2.5s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px 2px rgba(0, 240, 255, 0.5), inset 0 0 6px rgba(0, 240, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 24px 6px rgba(0, 240, 255, 0.8), inset 0 0 12px rgba(0, 240, 255, 0.6);
    }
}

@keyframes livePulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.live-dot {
    animation: livePulse 2s infinite ease-in-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #070c18;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* HTMX Transition Animations */
.htmx-fade-in {
    animation: fadeIn 0.3s ease-out;
}

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