html body #overlay {
  background:
    radial-gradient(circle at 50% 25%, rgba(0,190,255,.16), transparent 34%),
    linear-gradient(155deg,rgba(1,8,18,.96),rgba(3,18,31,.985)) !important;
}
html body #overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .15;
  pointer-events: none;
  background-image: radial-gradient(circle at center, #53d8ff 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom,black,transparent 75%);
}
html body .overlay-title { font-family: Tahoma,"Segoe UI",sans-serif !important; letter-spacing: 1px !important; background: linear-gradient(90deg,#a5f3fc,#fff,#67e8f9); -webkit-background-clip:text; color:transparent !important; }
html body .overlay-subtitle { color: #9dc5d7 !important; letter-spacing: 0 !important; }
html body .btn-main { font-family: Tahoma,"Segoe UI",sans-serif !important; border-radius: 13px !important; border:1px solid rgba(255,255,255,.18) !important; }
html body #topBar {
  padding-top: max(8px,var(--tg-content-safe-area-inset-top,0px)) !important;
  background: linear-gradient(180deg,rgba(0,7,16,.9),rgba(0,10,22,.46),transparent) !important;
  backdrop-filter: blur(6px);
}
html body .stat-value { font-family: Tahoma,"Segoe UI",sans-serif !important; }
html body #levelBadge { background: linear-gradient(135deg,#0891b2,#2563eb) !important; box-shadow: 0 0 18px rgba(34,211,238,.3) !important; }
html body #ammoBar { bottom: max(88px,calc(var(--tg-content-safe-area-inset-bottom,0px) + 72px)) !important; }
html body #hpBar { bottom: max(65px,calc(var(--tg-content-safe-area-inset-bottom,0px) + 48px)) !important; }
html body #pauseBtn { left: max(10px,var(--tg-content-safe-area-inset-left,0px)) !important; top: max(62px,calc(var(--tg-content-safe-area-inset-top,0px) + 56px)) !important; }
html body::after { content:"";position:fixed;inset:0;z-index:4;pointer-events:none;background:radial-gradient(ellipse at center,transparent 54%,rgba(0,7,16,.3) 100%),linear-gradient(180deg,rgba(79,213,255,.025),transparent 24%,transparent 78%,rgba(0,0,0,.14)); }
html[data-hamrazm-quality="performance"] body .stat-value,
body.game-reduced-fx .stat-value { text-shadow: none !important; }
html[data-hamrazm-quality="performance"] body #topBar,
body.game-reduced-fx #topBar { backdrop-filter: none !important; }
html[data-hamrazm-quality="performance"] body::after,body.game-reduced-fx::after{display:none}

@media (max-width: 620px) {
  html body #topBar { padding-left: 56px !important; gap: 3px; }
  html body .stat-box { min-width: 54px !important; }
  html body .stat-value { font-size: 17px !important; }
  html body .stat-label { font-size: 8px !important; }
  html body #levelBadge { padding: 4px 9px !important; font-size: 10px !important; }
}

/* ===== Production visual pass v7 ===== */
html.hz-airdef-v7 body { background:#02060c; }
html.hz-airdef-v7 #gameCanvas { filter:saturate(1.08) contrast(1.045); }
html.hz-airdef-v7 #topBar {
  width:min(720px,calc(100% - 24px));
  left:50% !important; right:auto !important; transform:translateX(-50%);
  margin-top:max(8px,var(--tg-content-safe-area-inset-top,0px));
  padding:8px 14px !important;
  border:1px solid rgba(126,225,239,.12);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(5,15,25,.72),rgba(5,12,19,.42)) !important;
  box-shadow:0 10px 35px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.03);
  backdrop-filter:blur(12px) saturate(1.15);
}
html.hz-airdef-v7 .stat-box { min-width:66px; }
html.hz-airdef-v7 .stat-label { color:#8fb7bf !important; letter-spacing:0 !important; font-size:9px !important; }
html.hz-airdef-v7 .stat-value { color:#f2fbff !important; text-shadow:0 0 12px rgba(88,231,255,.26) !important; font-variant-numeric:tabular-nums; }
html.hz-airdef-v7 #levelBadge {
  border:1px solid rgba(108,237,255,.25) !important;
  background:linear-gradient(135deg,rgba(16,122,147,.9),rgba(32,73,143,.9)) !important;
  box-shadow:0 0 18px rgba(34,211,238,.13) !important;
}
html.hz-airdef-v7 #pauseBtn {
  width:42px;height:42px;padding:0 !important;border-radius:13px !important;
  background:rgba(5,16,24,.62) !important;border:1px solid rgba(135,221,235,.18) !important;
  box-shadow:0 7px 20px rgba(0,0,0,.22);backdrop-filter:blur(9px);
}
html.hz-airdef-v7 #ammoBar {
  gap:4px !important;padding:7px 10px;border-radius:999px;
  background:rgba(3,11,16,.45);border:1px solid rgba(255,255,255,.06);backdrop-filter:blur(8px);
}
html.hz-airdef-v7 .ammo-dot { width:13px !important;height:4px !important;border-radius:2px !important;background:linear-gradient(90deg,#ffe08a,#ffad42) !important;box-shadow:0 0 7px rgba(255,181,71,.5) !important; }
html.hz-airdef-v7 .ammo-dot.empty { background:#243036 !important;box-shadow:none !important; }
html.hz-airdef-v7 #hpBar { height:7px !important;width:min(220px,46vw) !important;border:1px solid rgba(255,255,255,.08);background:rgba(2,8,12,.58) !important;box-shadow:0 4px 15px rgba(0,0,0,.25); }
html.hz-airdef-v7 #hpFill { box-shadow:0 0 10px rgba(78,236,182,.36); }
html.hz-airdef-v7 #reloadBar { height:5px !important;padding:1px;width:150px !important;background:rgba(2,8,12,.72) !important;border:1px solid rgba(255,255,255,.09); }
html.hz-airdef-v7 #reloadFill { background:linear-gradient(90deg,#52dfff,#7bf2c9) !important; }
html.hz-airdef-v7 #overlay {
  overflow:hidden;
  background:
    linear-gradient(180deg,rgba(1,7,14,.62),rgba(1,8,14,.78)),
    radial-gradient(circle at 50% 42%,rgba(30,140,167,.13),transparent 42%) !important;
  backdrop-filter:blur(3px) saturate(.92);
}
html.hz-airdef-v7 #overlay::before {
  opacity:1 !important;mask-image:none !important;background:
    linear-gradient(90deg,transparent 0 7%,rgba(90,230,255,.05) 7.2%,transparent 7.4% 92.6%,rgba(90,230,255,.05) 92.8%,transparent 93%),
    repeating-linear-gradient(0deg,rgba(128,228,255,.015) 0 1px,transparent 1px 5px) !important;
}
html.hz-airdef-v7 #overlay::after {
  content:"";position:absolute;inset:auto 12% 12% 12%;height:1px;
  background:linear-gradient(90deg,transparent,rgba(98,230,255,.2),transparent);pointer-events:none;
}
html.hz-airdef-v7 .overlay-title {
  position:relative;font-size:clamp(38px,7vw,78px) !important;line-height:1.1;margin-bottom:10px !important;
  background:linear-gradient(180deg,#fff 10%,#bdeef8 72%,#5fc7dc) !important;-webkit-background-clip:text !important;color:transparent !important;
  text-shadow:none !important;filter:drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
html.hz-airdef-v7 .overlay-subtitle { color:#78cddc !important;font-weight:700;margin-bottom:20px !important; }
html.hz-airdef-v7 #instructions {
  position:relative;width:min(540px,calc(100vw - 40px));max-width:540px !important;
  color:#bfd0d5 !important;background:rgba(5,14,20,.44);border:1px solid rgba(111,216,232,.1);
  border-radius:15px;padding:14px 18px;line-height:1.95 !important;margin-bottom:16px !important;
  box-shadow:0 12px 35px rgba(0,0,0,.18);backdrop-filter:blur(9px);
}
html.hz-airdef-v7 #instructions b { color:#f3fbff;font-size:1.05em; }
html.hz-airdef-v7 #instructions span { color:#88a6ad; }
html.hz-airdef-v7 .btn-main {
  min-width:190px;padding:13px 28px !important;border-radius:13px !important;
  background:linear-gradient(135deg,#147b96,#2453a6) !important;border:1px solid rgba(154,239,255,.2) !important;
  box-shadow:0 12px 28px rgba(0,0,0,.3),0 0 26px rgba(57,198,235,.12) !important;
  letter-spacing:0 !important;
}
html.hz-airdef-v7 .btn-main:hover { transform:translateY(-1px) scale(1.015) !important; }
html.hz-airdef-v7 #bestScore { color:#d7e3e6 !important;text-shadow:none !important;font-size:12px !important;opacity:.68; }
html.hz-airdef-v7 .stat-item { background:rgba(5,16,23,.5) !important;border-color:rgba(116,218,233,.1) !important;backdrop-filter:blur(8px); }
html.hz-airdef-v7 #bonusPopup { top:29% !important;padding:9px 16px;border-radius:12px;background:rgba(4,14,20,.52);font-size:clamp(15px,3vw,24px) !important;backdrop-filter:blur(6px); }
html.hz-airdef-v7 #levelUpPopup { top:32% !important;color:#d6f7ff !important;text-shadow:0 0 26px rgba(69,217,255,.5) !important; }
html.hz-airdef-v7 #crosshair::before,html.hz-airdef-v7 #crosshair::after { filter:drop-shadow(0 0 4px rgba(80,235,255,.75)); }

@media (max-width:620px){
  html.hz-airdef-v7 #topBar { width:calc(100% - 16px);padding:7px 8px !important;margin-top:6px;border-radius:13px; }
  html.hz-airdef-v7 .stat-box { min-width:47px !important; }
  html.hz-airdef-v7 .stat-value { font-size:16px !important; }
  html.hz-airdef-v7 .stat-label { font-size:7.5px !important; }
  html.hz-airdef-v7 #levelBadge { padding:4px 7px !important;font-size:9px !important; }
  html.hz-airdef-v7 #pauseBtn { width:38px;height:38px;top:max(58px,calc(var(--tg-content-safe-area-inset-top,0px) + 52px)) !important; }
  html.hz-airdef-v7 .overlay-title { font-size:clamp(36px,12vw,58px) !important; }
  html.hz-airdef-v7 #instructions { width:calc(100vw - 28px);padding:12px 13px;font-size:11px !important; }
  html.hz-airdef-v7 .btn-main { min-width:175px;padding:12px 22px !important; }
}

@media (prefers-reduced-motion:reduce){
  html.hz-airdef-v7 .btn-main,html.hz-airdef-v7 #levelUpPopup,html.hz-airdef-v7 #bonusPopup{transition:none !important;}
}

@media (orientation:landscape) and (pointer:coarse){
 html.hz-airdef-v7 #ammoBar{bottom:max(18px,calc(var(--tg-content-safe-area-inset-bottom,0px) + 8px))!important;transform:scale(.82);transform-origin:right bottom;opacity:.8}
 html.hz-airdef-v7 #hpBar{bottom:max(8px,var(--tg-content-safe-area-inset-bottom,0px))!important;width:min(160px,28vw)!important;opacity:.82}
 html.hz-airdef-v7 #reloadBar{bottom:max(30px,var(--tg-content-safe-area-inset-bottom,0px))!important;transform:scale(.82);transform-origin:right bottom}
}
#gameCanvas{image-rendering:auto}


/* v8.1 hosted HUD consolidation: primary ammo/HP/wave data lives in Hamrazm Core. */
body.hamrazm-core-host.hz-run-active #topBar,
body.hamrazm-core-host.hz-run-active #ammoBar,
body.hamrazm-core-host.hz-run-active #hpBar{display:none!important}
body.hamrazm-core-host.hz-run-active #reloadBar{z-index:7!important}

/* v8.2 hosted UI: Core owns the gameplay HUD. */
body.hz-run-active[data-hz-game="air-defense"] #topBar,body.hz-run-active[data-hz-game="air-defense"] #ammoBar,body.hz-run-active[data-hz-game="air-defense"] #hpBar,body.hz-run-active[data-hz-game="air-defense"] #reloadBar{display:none!important}
