@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-latin-variable.woff2') format('woff2');
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    touch-action: none;
    overscroll-behavior: none;
    background: #080c17;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* Inline SVG icon sprite replacements for Font Awesome — sized/colored like an icon font */
.icon { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: -0.125em; }
@keyframes iconSpin { to { transform: rotate(360deg); } }
.icon-spin { animation: iconSpin 2s linear infinite; }

/* Perf tier gating: backdrop-filter blur is one of the most expensive compositing
   operations on weak GPUs, and here it's composited on top of a live WebGL canvas.
   Disable it on low tier; bump background opacity to compensate for readability. */
[data-tier="low"] .glass,
[data-tier="low"] [class*="backdrop-blur"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-tier="low"] .glass { background: rgba(15, 23, 42, 0.96); }
#map { height: 100vh; width: 100vw; position: absolute; top: 0; left: 0; z-index: 10; background: #080c17; touch-action: none; }

.scrollable {
    overflow-y: auto !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
}
.hud { z-index: 50; }
.glass { background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); }

/* Updated Flag Card: Bottom positioning */
.flag-card { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease; }
.flag-card.hidden-flag { transform: translateY(120%) scale(0.8); opacity: 0; pointer-events: none; }
.flag-card.visible-flag { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

@keyframes pulseScale {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.animate-feedback { animation: pulseScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

@keyframes slideUpFade {
    0% { transform: translateY(20px); opacity: 0; }
    15% { transform: translateY(0); opacity: 1; }
    85% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-20px); opacity: 0; }
}
.toast-anim { animation: slideUpFade 2.5s ease-in-out forwards; }

/* Loading shimmer on ready button — runs on compositor, immune to JS blocking */
@keyframes btnShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.btn-loading {
    background: linear-gradient(90deg, #374151 0%, #4b5563 40%, #6b7280 50%, #4b5563 60%, #374151 100%);
    background-size: 200% 100%;
    animation: btnShimmer 1.8s ease-in-out infinite;
}
.btn-ready {
    background: #2563eb;
    animation: none;
}
@keyframes dotPulse {
    0%, 20% { opacity: 0.2; }
    50% { opacity: 1; }
    80%, 100% { opacity: 0.2; }
}
.dot-1 { animation: dotPulse 1.4s ease-in-out infinite; }
.dot-2 { animation: dotPulse 1.4s ease-in-out 0.2s infinite; }
.dot-3 { animation: dotPulse 1.4s ease-in-out 0.4s infinite; }
