body, html { margin: 0; padding: 0; height: 100%; width: 100%; background-color: #020202; font-family: 'Rajdhani', sans-serif; overflow: hidden; touch-action: none; }
#game-container { width: 100vw; height: 100vh; overflow: hidden; position: relative; display: flex; flex-direction: column; filter: blur(0px); transition: filter 0.5s; }
#map { flex: 1; width: 100%; background: #050505; z-index: 1; cursor: crosshair; }

/* AUTH */
#auth-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 5, 0, 0.95); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.auth-box { background: #000; border: 2px solid #0f0; padding: 30px; text-align: center; box-shadow: 0 0 30px rgba(0, 255, 0, 0.2); border-radius: 10px; width: 90%; max-width: 380px; box-sizing: border-box; }
.auth-title { font-family: 'Black Ops One'; font-size: 36px; color: #fff; text-shadow: 0 0 10px #0f0; margin-bottom: 10px; }
.auth-input { width: 100%; margin-bottom: 10px; font-size: 18px; padding: 10px; text-align:center; background:#000; color:#0f0; border:1px solid #0f0; font-family:'Share Tech Mono'; outline:none; box-sizing:border-box; }
.google-btn { background: #fff; color: #000; border: none; padding: 12px 24px; font-family: 'Rajdhani'; font-weight: bold; font-size: 18px; cursor: pointer; border-radius: 5px; width: 100%; transition: 0.2s; }
.google-btn:hover { background: #ddd; transform: scale(1.05); }
.reg-notes { background: #001100; border: 1px solid #333; border-radius: 5px; padding: 10px; margin-bottom: 15px; text-align: left; }
.reg-note { font-family: 'Share Tech Mono'; font-size: 11px; color: #aaa; padding: 3px 0; line-height: 1.4; }

/* OVERLAYS */
.overlay-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 5000; display: none; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.terminal-box { background: #0a0a0a; border: 1px solid rgba(0,255,255,0.25); padding: 20px; width: 360px; max-width: 95%; box-shadow: 0 0 40px rgba(0,255,255,0.08); border-radius: 8px; font-family: 'Share Tech Mono'; color: #0ff; box-sizing: border-box; }
.terminal-header { font-family: 'Black Ops One'; font-size: 20px; color: #0ff; border-bottom: 1px solid rgba(0,255,255,0.2); padding-bottom: 10px; margin-bottom: 15px; text-align: center; text-shadow: 0 0 8px rgba(0,255,255,0.4); letter-spacing: 2px; }
.terminal-stats { background: rgba(0,20,20,0.5); padding: 12px; border: 1px solid rgba(0,80,80,0.3); margin-bottom: 12px; border-radius: 6px; font-size: 13px; }

/* MILITARY ID */
.id-card-box { background: #111; border: 3px solid #333; width: 380px; max-width: 95%; border-radius: 8px; overflow: hidden; box-shadow: 0 0 50px rgba(0,0,0,0.8); font-family: 'Share Tech Mono'; color: #fff; }
.id-header { background: #000; padding: 12px; text-align: center; border-bottom: 2px solid #333; background-image: repeating-linear-gradient(45deg, #000, #000 10px, #111 10px, #111 20px); }
.id-body { display: flex; padding: 15px; gap: 15px; background: #222; }
.id-photo-section { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.id-photo-placeholder { width: 90px; height: 110px; background: #000; border: 2px solid #555; display: flex; align-items: center; justify-content: center; color: #555; font-size: 18px; cursor: pointer; transition: 0.2s; overflow: hidden; }
.id-photo-placeholder:hover { border-color: #0ff; }
.id-faction-flag { font-size: 36px; }
.id-details-section { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.id-row { display: flex; justify-content: space-between; border-bottom: 1px dotted #444; padding-bottom: 2px; }
.id-label { color: #aaa; font-size: 11px; }
.id-val { font-weight: bold; color: #fff; font-size: 14px; font-family: 'Rajdhani'; }
.id-rank-display { display: flex; align-items: center; background: #111; padding: 8px; border: 1px solid #444; margin-top: 3px; }
.rank-progress-container { width: 100%; height: 8px; background: #000; border: 1px solid #333; margin-top: 5px; }
.rank-progress-bar { height: 100%; background: #0f0; width: 0%; transition: width 0.5s; }
.id-footer { background: #000; padding: 10px; display: flex; gap: 8px; border-top: 2px solid #333; }
.id-stat-box { flex: 1; background: #111; border: 1px solid #333; padding: 8px; text-align: center; }
.box-win { border-color: #0f0; color: #0f0; } .box-loss { border-color: #f00; color: #f00; }
.id-stat-num { font-family: 'Black Ops One'; font-size: 20px; }
.id-stat-label { font-size: 9px; color: #aaa; }

/* ICON PICKER */
#icon-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 5px; }
.icon-pick-item { background: #111; border: 1px solid #333; border-radius: 5px; padding: 8px 4px; text-align: center; cursor: pointer; transition: 0.2s; }
.icon-pick-item:hover { border-color: #ff0; background: #221100; }
.icon-pick-item.owned { border-color: #0f0; background: #002200; }
.icon-pick-item.active-icon { border-color: #0ff; box-shadow: 0 0 10px #0ff; background: #001122; }
.icon-pick-item img { width: 48px; height: 48px; object-fit: contain; }
.icon-pick-price { font-family: 'Share Tech Mono'; font-size: 10px; color: #ff0; margin-top: 4px; }

/* LEADERBOARD TABS */
.lb-tab { flex: 1; background: #111; color: #555; border: none; padding: 8px 4px; font-family: 'Black Ops One'; font-size: 11px; cursor: pointer; transition: 0.2s; }
.lb-tab.active { background: #002200; color: #0f0; text-shadow: 0 0 5px #0f0; }
.lb-tab:hover { background: #003300; color: #0f0; }

/* BUTTONS */
.t-btn-clean { background: rgba(0,20,40,0.7); color: #0ff; border: 1px solid rgba(0,80,80,0.4); padding: 10px 12px; width: 100%; font-family: 'Rajdhani'; font-weight: bold; font-size: 13px; cursor: pointer; transition: 0.2s; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; }
.t-btn-clean:hover { background: rgba(0,255,255,0.12); border-color: rgba(0,255,255,0.6); }
.t-btn-clean:disabled { background: #111 !important; color: #555 !important; border-color: #333 !important; cursor: not-allowed; }
.cost-tag { font-family: 'Share Tech Mono'; font-size: 11px; color: inherit; opacity: 0.8; }
.t-btn-small { background: #0ff; color: #000; border: none; padding: 8px; width: 100%; font-family: 'Share Tech Mono'; font-weight:bold; cursor: pointer; border-radius: 3px; font-size: 12px; }
.close-store { background: rgba(50,50,50,0.7); color: #fff; border: 1px solid rgba(255,255,255,0.15); padding: 10px; width: 100%; font-family: 'Rajdhani'; font-weight: bold; cursor: pointer; border-radius: 5px; font-size: 14px; transition: 0.2s; }
.close-store:hover { background: rgba(80,80,80,0.7); }
.store-box { background: #111; border: 2px solid #0f0; padding: 20px; width: 320px; max-width: 95%; text-align: center; border-radius: 5px; box-sizing: border-box; }
.store-title { font-family: 'Black Ops One'; font-size: 22px; color: #0f0; margin-bottom: 15px; border-bottom: 1px solid #0f0; padding-bottom: 10px; }
.store-item { background: #000; border: 1px solid #333; margin: 10px 0; padding: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-radius: 3px; }
.store-item:hover { border-color: #0f0; background: #112211; }
.s-amt { font-family: 'Share Tech Mono'; color: #fff; font-size: 18px; }
.s-price { font-family: 'Rajdhani'; font-weight: bold; color: #0f0; font-size: 16px; background: rgba(0,255,0,0.1); padding: 5px; border-radius: 3px; }

/* HUD TOP BAR */
.hud-panel { position: absolute; z-index: 1000; background: rgba(0, 8, 0, 0.95); border: none; color: #fff; backdrop-filter: blur(8px); user-select: none; }
#top-bar { top: 0; width: 100%; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; box-sizing: border-box; border-bottom: 1px solid rgba(0,255,0,0.25); gap: 4px; z-index: 1001; background: rgba(0,8,0,0.97); }
.top-left { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.top-center { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.top-right { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.game-title-wrap { display: flex; align-items: center; }
.game-title-icon { width: 28px; height: 28px; object-fit: contain; margin-right: 6px; }
.game-title { font-family: 'Black Ops One'; font-size: 20px; color: #fff; text-shadow: 0 0 8px #0f0; white-space: nowrap; }
.game-title-com { font-family: 'Share Tech Mono'; font-size: 11px; color: #8a8; margin-left: 1px; text-shadow: 0 0 4px rgba(0,255,0,0.3); }

/* THREE INFO BUTTONS */
.hud-info-row { display: flex; align-items: center; gap: 5px; font-family: 'Share Tech Mono'; font-size: 12px; }
.hud-info-btn { padding: 6px 12px; border-radius: 5px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); white-space: nowrap; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 5px; min-height: 36px; }
.hud-info-btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); }
.hud-info-btn:active { transform: scale(0.97); }
.hud-btn-profile { color: #0ff; }
.hud-btn-rank { color: #0f0; }
.hud-btn-hq { color: #ff0; }
.hud-btn-icon { width: 18px; height: 18px; object-fit: contain; border-radius: 2px; }
.hud-btn-rank-icon { width: 16px; height: 16px; object-fit: contain; }

.country-select { background: #000; color: #0f0; border: 1px solid #0f0; font-family: 'Share Tech Mono'; font-size: 16px; padding: 5px; outline: none; cursor: pointer; border-radius:3px; }
.stats-area { font-family: 'Share Tech Mono'; color: #0f0; background: rgba(0,255,0,0.06); padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(0,255,0,0.25); white-space: nowrap; font-size: 12px; cursor: pointer; }
.nav-btn { background: rgba(0,30,0,0.6); border: 1px solid rgba(255,255,255,0.12); color: #aaa; padding: 5px 8px; font-family: 'Rajdhani'; font-weight: bold; font-size: 14px; cursor: pointer; transition: 0.2s; white-space: nowrap; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.nav-btn:hover { background: rgba(0,255,0,0.12); color: #0f0; border-color: rgba(0,255,0,0.4); }
.top-btn-group { display: flex; gap: 3px; }
.sidebar-toggle { font-size: 18px; padding: 3px 7px; }

/* SETTINGS PANEL */
#settings-panel { position: absolute; top: 61px; right: 8px; width: 250px; max-width: 90%; background: rgba(5,5,5,0.97); border: 1px solid rgba(0,255,0,0.25); z-index: 2000; padding: 15px; display: none; flex-direction: column; font-family: 'Share Tech Mono'; color: #0f0; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }

/* LEFT SIDEBAR */
#left-sidebar { position: absolute; top: 58px; left: 0; bottom: 0; width: 270px; background: rgba(0, 8, 0, 0.96); border-right: 1px solid rgba(0,255,0,0.15); z-index: 1000; display: flex; flex-direction: column; transition: transform 0.3s ease; }
#left-sidebar.sidebar-open { transform: translateX(0); }
#left-sidebar.sidebar-closed { transform: translateX(-100%); }
.sidebar-tabs { display: flex; width: 100%; min-height: 40px; background: rgba(0,0,0,0.5); border-bottom: 1px solid rgba(0,255,0,0.15); }
.sidebar-tab { flex: 1; border: none; background: transparent; color: #555; font-family: 'Black Ops One'; font-size: 13px; cursor: pointer; transition: 0.2s; padding: 8px; }
.sidebar-tab.active { background: rgba(0,30,0,0.5); color: #0f0; text-shadow: 0 0 8px #0f0; border-bottom: 2px solid #0f0; }
.sidebar-tab:hover { color: #0f0; }
.deck-content { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }

/* ARSENAL LOCK */
.arsenal-lock-btn { width: 100%; padding: 10px; border-radius: 6px; font-family: 'Black Ops One'; font-size: 14px; cursor: pointer; transition: 0.2s; border: 2px solid; text-align: center; }
.arsenal-lock-btn.locked { background: rgba(20,0,0,0.6); color: #f44; border-color: rgba(255,68,68,0.4); }
.arsenal-lock-btn.locked:hover { background: rgba(255,68,68,0.12); }
.arsenal-lock-btn.unlocked { background: rgba(0,20,0,0.6); color: #0f0; border-color: rgba(0,255,0,0.4); animation: pulse-glow 2s infinite; }
.arsenal-lock-btn.unlocked:hover { background: rgba(0,255,0,0.12); }
@keyframes pulse-glow { 0%,100% { box-shadow: 0 0 5px rgba(0,255,0,0.2); } 50% { box-shadow: 0 0 15px rgba(0,255,0,0.5); } }

/* HQ PANEL */
.hq-action-btn { width: 100%; padding: 10px; margin-bottom: 6px; background: rgba(0,20,40,0.5); color: #0ff; border: 1px solid rgba(0,80,80,0.3); font-family: 'Rajdhani'; font-weight: bold; font-size: 13px; cursor: pointer; border-radius: 5px; text-align: left; display: flex; align-items: center; gap: 8px; transition: 0.2s; box-sizing: border-box; }
.hq-action-btn:hover { background: rgba(0,255,255,0.08); border-color: rgba(0,255,255,0.4); }
.hq-action-btn.primary { border-color: rgba(0,255,0,0.4); color: #0f0; background: rgba(0,20,0,0.5); }
.hq-action-btn.primary:hover { background: rgba(0,255,0,0.08); }

/* HQ STATS CARD in sidebar */
.hq-stats-card { background: rgba(0,15,15,0.6); border: 1px solid rgba(0,80,80,0.25); border-radius: 6px; padding: 12px; margin-top: 6px; font-family: 'Share Tech Mono'; font-size: 11px; color: #0ff; }
.hq-card-title { font-family: 'Black Ops One'; font-size: 14px; margin-bottom: 8px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.hq-stat-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.hq-stat-label { color: #777; }
.hq-upgrade-section { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.hq-upg-btn { padding: 7px 10px; background: rgba(0,20,40,0.7); color: #0ff; border: 1px solid rgba(0,80,80,0.35); font-family: 'Rajdhani'; font-weight: bold; font-size: 12px; cursor: pointer; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.hq-upg-btn:hover { background: rgba(0,255,255,0.1); border-color: rgba(0,255,255,0.5); }
.hq-upg-btn.repair { border-color: rgba(255,165,0,0.35); color: #f90; }
.hq-upg-btn.repair:hover { background: rgba(255,165,0,0.08); }
.hq-upg-btn.relocate { border-color: rgba(255,0,0,0.35); color: #f66; }
.hq-upg-btn.relocate:hover { background: rgba(255,0,0,0.08); }

.item-card { width: 100%; min-height: 55px; background: rgba(10,10,10,0.7); border: 1px solid rgba(255,255,255,0.08); cursor: pointer; display: flex; align-items: center; padding: 0 8px; box-sizing: border-box; transition: 0.2s; border-radius: 5px; }
.item-card.active { background: rgba(0,30,0,0.7); border: 1px solid rgba(0,255,0,0.6); box-shadow: inset 0 0 15px rgba(0,255,0,0.15); }
.item-card.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.i-icon { margin-right: 10px; width: 34px; height: 34px; object-fit: contain; pointer-events: none; }
.card-info { display: flex; flex-direction: column; text-align: left; pointer-events: none; }
.i-name { font-size: 12px; color: #fff; font-weight: bold; font-family: 'Rajdhani'; }
.i-cost { font-size: 10px; color: #ffd700; font-family: 'Share Tech Mono'; }

/* TARGET INTEL - REDESIGNED */
.target-intel-header { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(40,0,0,0.3); border-radius: 6px; margin-bottom: 10px; }
.target-intel-icon { width: 64px; height: 64px; background: rgba(255,0,0,0.08); border: 2px solid rgba(255,0,0,0.25); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; overflow: hidden; }
.target-intel-name { font-family: 'Black Ops One'; font-size: 16px; color: #f66; }
.target-intel-owner { font-size: 11px; color: #aaa; margin-top: 2px; }
.target-intel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.target-stat-box { background: rgba(20,0,0,0.3); border: 1px solid rgba(255,0,0,0.12); border-radius: 5px; padding: 8px; text-align: center; }
.target-stat-val { font-family: 'Black Ops One'; font-size: 16px; color: #f66; }
.target-stat-label { font-size: 9px; color: #777; margin-top: 2px; }

/* ATTACK INTEL */
#attack-log-panel { position: absolute; top: 115px; right: 8px; width: 240px; background: rgba(5,5,5,0.92); border: 1px solid rgba(255,0,0,0.25); z-index: 999; border-radius: 6px; backdrop-filter: blur(8px); display: flex; flex-direction: column; max-height: 180px; overflow: hidden; }
.log-title { background: rgba(40,0,0,0.5); color: #f66; font-family: 'Black Ops One'; font-size: 11px; padding: 5px 8px; text-align: center; border-bottom: 1px solid rgba(255,0,0,0.15); display: flex; justify-content: space-between; align-items: center; letter-spacing: 1px; }
.log-title-text { flex: 1; text-align: center; }
.mute-intel-btn { background: none; border: 1px solid rgba(255,0,0,0.25); color: #f66; font-size: 9px; padding: 1px 5px; border-radius: 3px; cursor: pointer; font-family: 'Share Tech Mono'; }
.mute-intel-btn:hover { background: rgba(255,0,0,0.1); }
#attack-log-content { padding: 6px; font-family: 'Share Tech Mono'; font-size: 10px; color: #fff; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.attack-log-entry { border-left: 2px solid rgba(255,0,0,0.4); padding: 3px 5px; background: rgba(255,0,0,0.04); border-radius: 0 3px 3px 0; }
.attack-log-link { color: #0ff; cursor: pointer; text-decoration: underline; font-weight: bold; }

/* GAME MSG */
#game-msg { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.92); border: 1px solid rgba(0,255,0,0.4); color: #0f0; padding: 8px 16px; font-family: 'Share Tech Mono'; font-size: 13px; z-index: 9999; display: none; text-shadow: 0 0 5px rgba(0,255,0,0.4); box-shadow: 0 4px 20px rgba(0,0,0,0.4); border-radius: 6px; max-width: 90%; text-align: center; }
.msg-error { color: #f00 !important; border-color: rgba(255,0,0,0.4) !important; text-shadow: 0 0 5px rgba(255,0,0,0.4) !important; }

/* SEARCH */
.search-res-item { padding: 5px 10px; border-bottom: 1px solid #222; cursor: pointer; font-size: 12px; transition: 0.2s; color: #ccc; font-family: 'Share Tech Mono'; }
.search-res-item:hover { background: #003300; color: #0f0; }

/* FX & MAP */
.base-rect { transition: fill-opacity 0.2s; cursor: pointer; }
.base-rect:hover { fill-opacity: 0.8 !important; }
.smooth-fade-out { transition: opacity 1s ease-out, stroke-opacity 1s ease-out; opacity: 0; stroke-opacity: 0; }
.missile-container { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; position: relative; will-change: transform; transform-origin: bottom center; }
.missile-body-img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.fx-ring { border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-sizing: border-box; pointer-events: none; animation: fx-expand-fade ease-out forwards; }
.fx-circle { border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; animation: fx-fade ease-out forwards; }
@keyframes fx-expand-fade { 0% { width: 0; height: 0; opacity: 1; border-width: 4px; } 100% { width: 100%; height: 100%; opacity: 0; border-width: 0px; } }
@keyframes fx-fade { 0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); } 50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } }
.flight-particle { border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; animation: particle-glow linear forwards; will-change: transform, opacity, box-shadow; }
@keyframes particle-glow { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 4px currentColor; } 50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.5); box-shadow: 0 0 12px currentColor, inset 0 0 4px #fff; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); box-shadow: 0 0 0 currentColor; } }
.crater-scale-up { transform-origin: center; transform-box: fill-box; animation: crater-expand 0.5s ease-out forwards; }
@keyframes crater-expand { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.path-hidden { opacity: 0 !important; }

/* INTERCEPTOR LASER */
.interceptor-laser { stroke-dasharray: 8,4; animation: laser-dash 0.3s linear infinite; }
@keyframes laser-dash { to { stroke-dashoffset: -12; } }

/* DEPRECATED: Debug overlay removed */

/* HQ LEADERBOARD IN PANEL */
.hq-lb-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 11px; cursor: pointer; transition: 0.15s; border-radius: 3px; }
.hq-lb-item:hover { background: rgba(0,255,255,0.06); }

/* SIREN INDICATOR — kept for fallback */
.siren-indicator { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #f00; z-index: 9998; animation: siren-flash 0.5s ease-in-out infinite alternate; pointer-events: none; }
@keyframes siren-flash { 0% { opacity: 1; } 100% { opacity: 0.2; } }

/* INTEL ALERT — blink the intel panel border */
.intel-alert { animation: intel-blink 0.5s ease-in-out infinite alternate; }
@keyframes intel-blink { 0% { border-color: rgba(255,0,0,0.8); box-shadow: 0 0 12px rgba(255,0,0,0.4); } 100% { border-color: rgba(255,0,0,0.15); box-shadow: none; } }

/* Yellow pulse for supply collect button */
@keyframes pulse-glow-yellow { 0%,100% { box-shadow: 0 0 5px rgba(255,255,0,0.2); } 50% { box-shadow: 0 0 15px rgba(255,255,0,0.5); } }

/* MOBILE */
@media (max-width: 768px) {
    .auth-title { font-size: 28px; }
    .auth-box { padding: 20px; }
    .game-title { font-size: 14px; }
    #top-bar { height: 50px; padding: 0 4px; }
    .hud-info-row { gap: 3px; font-size: 9px; }
    .hud-info-btn { padding: 4px 6px; font-size: 10px; min-height: 32px; }
    .hud-btn-icon { width: 16px; height: 16px; }
    .stats-area { font-size: 11px; padding: 4px 6px; }
    .nav-btn { padding: 6px 8px; font-size: 16px; min-height: 32px; min-width: 32px; }
    #left-sidebar { width: 240px; top: 52px; }
    .terminal-box { width: 95%; padding: 15px; }
    .id-card-box { width: 95%; }
    .id-body { flex-direction: column; align-items: center; gap: 10px; }
    #attack-log-panel { width: 200px; top: 56px; right: 4px; max-height: 130px; }
    #game-msg { font-size: 11px; top: 50px; }
    #settings-panel { width: 90%; right: 5%; top: 52px; }
    /* Better touch targets for sidebar */
    .sidebar-tab { padding: 10px; font-size: 13px; min-height: 40px; }
    .item-card { min-height: 50px; padding: 4px 8px; }
    .hq-upg-btn { padding: 10px; font-size: 13px; }
    .hq-action-btn { padding: 12px; font-size: 14px; }
    .cmd-action-btn { padding: 10px; font-size: 13px; }
    .arsenal-lock-btn { padding: 12px; font-size: 14px; }
}
@media (max-width: 480px) {
    .game-title { font-size: 12px; }
    .game-title-com { display: none; }
    .hud-info-btn { padding: 3px 5px; font-size: 9px; }
    .hud-btn-icon { width: 14px; height: 14px; }
    #left-sidebar { width: 85vw; max-width: 280px; }
    #attack-log-panel { width: 170px; top: 52px; }
    .nav-btn { min-height: 36px; min-width: 36px; }
}

/* LANDSCAPE MOBILE */
@media (max-height: 500px) and (orientation: landscape) {
    #top-bar { height: 40px; }
    .game-title { font-size: 12px; }
    .hud-info-btn { padding: 2px 5px; font-size: 9px; min-height: 28px; }
    .nav-btn { padding: 4px 6px; font-size: 14px; min-height: 28px; min-width: 28px; }
    #left-sidebar { top: 42px; width: 240px; }
    .sidebar-tabs { min-height: 34px; }
    .sidebar-tab { padding: 6px; font-size: 11px; }
    .deck-content { padding: 4px; gap: 4px; }
    .item-card { min-height: 44px; }
    .i-icon { width: 28px; height: 28px; }
    .i-name { font-size: 11px; }
    #attack-log-panel { top: 44px; width: 180px; max-height: 100px; }
    .log-title { font-size: 10px; padding: 3px 6px; }
    .terminal-box { padding: 12px; max-height: 90vh; overflow-y: auto; }
    .id-card-box { max-height: 90vh; overflow-y: auto; }
    #game-msg { top: 42px; font-size: 10px; }
    #settings-panel { top: 42px; }
    .hq-action-btn { padding: 7px; font-size: 12px; }
    /* Ensure sidebar doesn't cover whole screen in landscape */
    #left-sidebar { width: 220px; }
}

/* TOUCH DEVICE IMPROVEMENTS */
@media (pointer: coarse) {
    .item-card { min-height: 52px; }
    .hq-upg-btn { min-height: 38px; }
    .cmd-action-btn { min-height: 38px; }
    .cmd-sm-btn { min-height: 30px; padding: 6px 10px; }
    .close-store { min-height: 42px; }
    .nav-btn { min-height: 36px; min-width: 36px; }
    .hud-info-btn { min-height: 34px; }
    /* Prevent text selection on game elements */
    .hud-panel, .sidebar-tab, .item-card, .hq-upg-btn, .cmd-action-btn, .arsenal-lock-btn {
        -webkit-user-select: none; user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

body.is-fullscreen #fullscreen-btn { color: #0f0 !important; border-color: rgba(0,255,0,0.4) !important; }

/* Locked icon B&W filter */
.icon-pick-item.locked-icon img { filter: grayscale(1) brightness(0.4); }
.icon-pick-item.locked-icon { opacity: 0.7; cursor: not-allowed; }
.icon-pick-item.locked-icon .icon-pick-price { color: #666; }

/* CMD CENTER SECTIONS */
.cmd-section { background: rgba(0,10,10,0.4); border: 1px solid rgba(255,255,255,0.06); border-radius: 5px; padding: 10px; margin-bottom: 8px; }
.cmd-section.cmd-hq { border-color: rgba(0,200,0,0.25); background: rgba(0,15,0,0.4); }
.cmd-section.cmd-shield { border-color: rgba(0,150,255,0.25); background: rgba(0,10,30,0.4); }
.cmd-section.cmd-interceptor { border-color: rgba(255,100,180,0.25); background: rgba(20,0,20,0.4); }
.cmd-section-title { font-family: 'Black Ops One', cursive; font-size: 11px; color: #888; letter-spacing: 1.5px; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cmd-action-btn { padding: 7px 12px; background: rgba(0,20,40,0.6); color: #0ff; border: 1px solid rgba(0,80,80,0.3); font-family: 'Rajdhani', sans-serif; font-weight: bold; font-size: 12px; cursor: pointer; border-radius: 4px; transition: 0.15s; }
.cmd-action-btn:hover { background: rgba(0,255,255,0.08); border-color: rgba(0,255,255,0.4); }
.cmd-action-btn.repair { border-color: rgba(255,165,0,0.4); color: #f90; }
.cmd-action-btn.repair:hover { background: rgba(255,165,0,0.08); }
.cmd-action-btn.repair-orange { border-color: rgba(255,165,0,0.4); color: #f90; }
.cmd-action-btn.repair-orange:hover { background: rgba(255,165,0,0.08); }
.cmd-sm-btn { padding: 4px 8px; background: rgba(0,20,20,0.5); color: #0ff; border: 1px solid rgba(0,80,80,0.3); font-family: 'Share Tech Mono', monospace; font-size: 10px; cursor: pointer; border-radius: 3px; white-space: nowrap; }
.cmd-sm-btn:hover { background: rgba(0,255,255,0.1); }

/* HQ Panel orange repair */
.hq-upg-btn.repair-orange { border-color: rgba(255,165,0,0.4); color: #f90; background: rgba(40,25,0,0.6); }
.hq-upg-btn.repair-orange:hover { background: rgba(255,165,0,0.1); border-color: rgba(255,165,0,0.6); }

/* Intel tab buttons */
.intel-tab-btn { transition: 0.15s; border-bottom: 2px solid transparent !important; }
.intel-tab-btn.active { border-bottom: 2px solid currentColor !important; }
.intel-tab-btn:hover { opacity: 0.8; }

/* HQ Panel mini locate button - green */
.hq-mini-btn { padding: 4px 14px; background: rgba(0,40,0,0.5); color: #0f0; border: 1px solid rgba(0,255,0,0.4); font-family: 'Share Tech Mono', monospace; font-size: 11px; cursor: pointer; border-radius: 3px; font-weight: bold; }
.hq-mini-btn:hover { background: rgba(0,255,0,0.15); }

/* Color-coded section boxes for HQ panel */
.hq-section-box { border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.hq-section-box.hq-box { background: rgba(0,20,0,0.3); border: 1px solid rgba(0,200,0,0.25); }
.hq-section-box.shield-box { background: rgba(0,10,30,0.3); border: 1px solid rgba(0,150,255,0.25); }
.hq-section-box.interceptor-box { background: rgba(20,0,20,0.3); border: 1px solid rgba(255,100,180,0.25); }
.hq-section-box.supply-box { background: rgba(30,30,0,0.3); border: 1px solid rgba(255,255,0,0.25); }

/* Color-coded upgrade buttons */
.hq-upg-btn.btn-green { border-color: rgba(0,200,0,0.4); color: #0f0; background: rgba(0,30,0,0.6); }
.hq-upg-btn.btn-green:hover { background: rgba(0,255,0,0.1); border-color: rgba(0,255,0,0.6); }
.hq-upg-btn.btn-blue { border-color: rgba(0,150,255,0.4); color: #4af; background: rgba(0,15,40,0.6); }
.hq-upg-btn.btn-blue:hover { background: rgba(0,150,255,0.1); border-color: rgba(0,150,255,0.6); }
.hq-upg-btn.btn-pink { border-color: rgba(255,100,180,0.4); color: #f8a; background: rgba(30,0,20,0.6); }
.hq-upg-btn.btn-pink:hover { background: rgba(255,100,180,0.1); border-color: rgba(255,100,180,0.6); }
.hq-upg-btn.btn-collect { border-color: rgba(0,255,0,0.5); color: #0f0; background: rgba(0,40,0,0.7); animation: pulse-glow 1.5s infinite; }
.hq-upg-btn.btn-collect:hover { background: rgba(0,255,0,0.15); }
.hq-upg-btn.btn-faded { opacity: 0.35; cursor: not-allowed; pointer-events: none; border-color: rgba(255,255,0,0.15); color: #886; background: rgba(20,20,0,0.3); }

/* HQ Section dividers */
.hq-section-title { font-family: 'Black Ops One', cursive; font-size: 10px; color: #555; letter-spacing: 1.5px; margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* Leaderboard section titles */
.lb-section-title { font-family: 'Black Ops One', cursive; font-size: 11px; color: #888; letter-spacing: 1px; padding: 6px 0 4px; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 4px; }

/* Dark themed impact popup */
.dark-impact-popup .leaflet-popup-content-wrapper { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; }
.dark-impact-popup .leaflet-popup-content { margin: 0 !important; }
.dark-impact-popup .leaflet-popup-tip-container { display: none !important; }
.dark-impact-popup .leaflet-popup-close-button { display: none !important; }

/* Priority intel entry */
.attack-log-entry.priority-entry { border-left: 2px solid rgba(255,0,0,0.8); background: rgba(255,0,0,0.1); }

/* CMD section overflow fix */
.cmd-section { overflow: hidden; box-sizing: border-box; }
