/* ============================================================
   OFFICE RAMPAGE — styles.css  ULTIMATE EDITION
   happystoner5420 Games © 2026
   Photo-Real AAA Dark UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #050205;
  font-family: 'Rajdhani', 'Courier New', Courier, monospace;
  color: #e8e4dc;
  cursor: crosshair;
}

/* ── SCREENS ───────────────────────────────────────────────── */
.screen {
  position: fixed; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.screen.active { display: flex; }

/* ════════════════════════════════════════════════════════════
   MAIN MENU — Cinematic dark with blood and grit
════════════════════════════════════════════════════════════ */
#mainMenu {
  background:
    radial-gradient(ellipse at 30% 40%, rgba(80,0,0,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(40,0,0,0.28) 0%, transparent 55%),
    radial-gradient(ellipse at center, #130608 0%, #060103 60%, #020002 100%);
  flex-direction: column;
}

/* Scanline overlay */
#mainMenu::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* Noise grain overlay */
#mainMenu::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.menu-bg-overlay {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,  transparent, transparent 47px, rgba(200,0,0,0.025) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(200,0,0,0.015) 48px);
  pointer-events: none;
  z-index: 1;
}

/* Blood splatters */
.blood-splatter {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.65;
}
.blood-splatter.s1 {
  width: 280px; height: 190px; top: 5%; left: 2%;
  background: radial-gradient(ellipse at 40% 35%, #920000 0%, #480000 45%, transparent 70%);
  transform: rotate(-18deg);
  filter: blur(1.5px);
}
.blood-splatter.s2 {
  width: 160px; height: 110px; top: 62%; right: 5%;
  background: radial-gradient(ellipse at 55% 45%, #aa0000 0%, #500000 50%, transparent 72%);
  transform: rotate(28deg);
  filter: blur(1px);
}
.blood-splatter.s3 {
  width: 220px; height: 100px; bottom: 8%; left: 14%;
  background: radial-gradient(ellipse at 35% 50%, #980000 0%, #400000 48%, transparent 70%);
  transform: rotate(-8deg);
  filter: blur(2px);
}

/* Menu content */
.menu-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 44px;
}

/* ── LOGO ── */
.game-logo { text-align: center; }
.logo-line1 {
  font-size: clamp(68px, 11vw, 130px);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #f0f0f0;
  text-shadow:
    0 0 20px #ff0000,
    0 0 45px rgba(220,0,0,0.75),
    0 0 90px rgba(160,0,0,0.4),
    5px 5px 0 #3d0000,
    5px 5px 20px rgba(0,0,0,0.8);
  line-height: 1;
  font-family: Impact, 'Arial Black', sans-serif;
  animation: flicker 3.5s ease-in-out infinite alternate;
}
.logo-line2 {
  font-size: clamp(50px, 9vw, 100px);
  font-weight: 900;
  letter-spacing: 0.35em;
  color: #dd0000;
  text-shadow:
    0 0 15px #ff2200,
    0 0 35px rgba(200,0,0,0.65),
    0 0 70px rgba(120,0,0,0.35),
    4px 4px 0 #1a0000;
  line-height: 1;
  font-family: Impact, 'Arial Black', sans-serif;
  animation: flicker 4.2s ease-in-out infinite alternate-reverse;
}
.logo-tagline {
  font-size: 13px; letter-spacing: 0.25em;
  color: #ff5500; margin-top: 10px; opacity: 0.92;
  text-shadow: 0 0 10px #ff3300;
  font-weight: 700;
}

/* ── MENU BUTTONS ── */
.menu-nav {
  display: flex; flex-direction: column; gap: 16px; align-items: center;
  min-width: 340px;
}
.menu-btn {
  width: 100%; padding: 17px 36px;
  background: linear-gradient(180deg, rgba(30,0,0,0.95) 0%, rgba(10,0,0,0.98) 100%);
  border: 1px solid #660000;
  border-top-color: #880000;
  border-radius: 2px;
  color: #ff4444;
  font-family: 'Rajdhani', 'Courier New', monospace;
  font-size: 19px; font-weight: 700;
  letter-spacing: 0.12em;
  cursor: crosshair;
  transition: all 0.12s ease;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
/* Shimmer effect */
.menu-btn::before {
  content: '';
  position: absolute; left: -120%; top: 0; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,60,60,0.08), transparent);
  transition: left 0.4s ease;
}
.menu-btn:hover::before { left: 160%; }
/* Side accent bar */
.menu-btn::after {
  content: '';
  position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, #cc0000, #660000);
  opacity: 0;
  transition: opacity 0.12s;
}
.menu-btn:hover::after { opacity: 1; }
.menu-btn:hover {
  background: linear-gradient(180deg, rgba(60,0,0,0.98) 0%, rgba(28,0,0,0.99) 100%);
  border-color: #cc0000;
  border-top-color: #ee0000;
  color: #ff9999;
  text-shadow: 0 0 12px rgba(255,80,80,0.8);
  transform: translateX(4px);
  box-shadow: -4px 0 20px rgba(180,0,0,0.35), inset 0 0 20px rgba(100,0,0,0.1);
}
.menu-btn.primary {
  background: linear-gradient(180deg, rgba(60,0,0,0.98) 0%, rgba(22,0,0,0.99) 100%);
  border-color: #ff0000;
  border-top-color: #ff4444;
  color: #ffffff;
  font-size: 23px;
  text-shadow: 0 0 14px #ff0000, 0 0 28px rgba(255,0,0,0.4);
  box-shadow: 0 0 18px rgba(220,0,0,0.3), inset 0 0 24px rgba(80,0,0,0.15);
}
.menu-btn.primary:hover {
  background: linear-gradient(180deg, rgba(100,0,0,0.99) 0%, rgba(50,0,0,0.99) 100%);
  box-shadow: -4px 0 28px rgba(255,0,0,0.5), inset 0 0 28px rgba(120,0,0,0.2);
  text-shadow: 0 0 18px #ff2200, 0 0 40px rgba(255,0,0,0.6);
}
.menu-btn.danger {
  border-color: #282828; color: #686868;
  opacity: 0.7;
}
.menu-btn.danger:hover {
  border-color: #555; color: #a0a0a0;
  background: linear-gradient(180deg, rgba(20,20,20,0.98) 0%, rgba(10,10,10,0.99) 100%);
  box-shadow: none; transform: none;
  text-shadow: none;
}
.menu-btn:active { transform: translateX(2px) scale(0.98); }

.menu-footer {
  font-size: 11px; color: #3a0a0a; letter-spacing: 0.18em;
  text-align: center; opacity: 0.65;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   OVERLAY PANELS (HTP / Credits)
════════════════════════════════════════════════════════════ */
.overlay-panel {
  background: linear-gradient(180deg, rgba(12,4,4,0.98) 0%, rgba(5,1,1,0.99) 100%);
  border: 1px solid #550000;
  border-top: 1px solid #880000;
  border-radius: 2px;
  padding: 44px 52px;
  max-width: 660px; width: 92%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 0 50px rgba(160,0,0,0.25), inset 0 0 80px rgba(80,0,0,0.06);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.panel-title {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 40px; letter-spacing: 0.22em;
  color: #cc0000;
  text-shadow: 0 0 18px #ff0000, 0 0 40px rgba(200,0,0,0.4);
  text-align: center; margin-bottom: 30px;
  border-bottom: 1px solid rgba(80,0,0,0.6); padding-bottom: 18px;
}

/* HOW TO PLAY */
.htp-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 26px;
}
.htp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(80,0,0,0.1); border: 1px solid rgba(80,0,0,0.35); border-radius: 2px;
}
.key {
  background: rgba(20,0,0,0.9); border: 1px solid #550000;
  color: #ff7766; padding: 4px 8px; border-radius: 2px;
  font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: 0.05em;
  min-width: 84px; text-align: center;
  text-shadow: 0 0 6px rgba(255,80,60,0.5);
}
.desc { font-size: 13px; color: #b8a0a0; }
.htp-tips { margin-bottom: 26px; }
.htp-tips p {
  font-size: 13px; color: #a08888; margin-bottom: 7px;
  padding: 7px 12px;
  border-left: 3px solid #660000;
  background: rgba(60,0,0,0.08);
}
.htp-tips strong { color: #ff7744; }

/* CREDITS */
.credits-block { text-align: center; margin-bottom: 30px; }
.credits-studio {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 34px; color: #ff4444;
  text-shadow: 0 0 14px #cc0000, 0 0 28px rgba(180,0,0,0.35);
  letter-spacing: 0.22em; margin-bottom: 10px;
}
.credits-name {
  font-size: 24px; color: #ff8888;
  font-weight: 700; letter-spacing: 0.12em;
  margin: 8px 0;
}
.credits-role { font-size: 13px; color: #886666; margin: 4px 0; letter-spacing: 0.08em; }
.credits-disclaimer {
  font-size: 12px; color: #664444; margin-top: 18px;
  border: 1px dashed rgba(80,0,0,0.5); padding: 12px; border-radius: 2px;
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════
   GAME SCREEN
════════════════════════════════════════════════════════════ */
#gameScreen {
  background: #050205;
  position: fixed; inset: 0;
  display: none;
}
#gameScreen.active { display: block; }
#gameCanvas {
  display: block;
  width: 100vw; height: 100vh;
  image-rendering: auto;
}

/* ════════════════════════════════════════════════════════════
   HUD — Tactical Operator Interface
════════════════════════════════════════════════════════════ */
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.92) 0%,
    rgba(0,0,0,0.7) 60%,
    rgba(0,0,0,0) 100%
  );
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  pointer-events: none;
  z-index: 100;
  border-bottom: 1px solid rgba(200,0,0,0.18);
}
/* Scanlines on HUD */
#hud::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.06) 3px, rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
}
#hudLeft, #hudRight, #hudCenter {
  display: flex; align-items: center; gap: 20px;
  position: relative;
}
#hudRight { pointer-events: all; }
.hud-label {
  font-size: 9px; color: #660000; letter-spacing: 0.25em;
  font-weight: 700; margin-right: 5px;
  text-transform: uppercase;
}

/* Health bar */
#hudHealth { display: flex; align-items: center; gap: 10px; }
#healthBar {
  width: 130px; height: 10px;
  background: rgba(20,0,0,0.85);
  border: 1px solid rgba(80,0,0,0.7);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}
/* Scanlines on bar */
#healthBar::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,
    transparent, transparent 8px,
    rgba(0,0,0,0.15) 8px, rgba(0,0,0,0.15) 9px
  );
}
#healthFill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, #aa0000, #ff2200, #ff5500);
  transition: width 0.18s ease;
  box-shadow: 0 0 8px rgba(255,20,0,0.6);
  position: relative;
}
/* Fill gloss */
#healthFill::after {
  content: '';
  position: absolute; inset: 0 0 50% 0;
  background: rgba(255,255,255,0.12);
}

#ammoCount, #weaponName, #fuelCount {
  font-size: 16px; font-weight: 700;
  color: #ffbb44; text-shadow: 0 0 8px rgba(255,160,0,0.7);
  letter-spacing: 0.06em;
}
#killCount, #destroyCount {
  font-size: 14px; color: #ff4444;
  letter-spacing: 0.12em;
  text-shadow: 0 0 7px rgba(220,0,0,0.6);
  font-weight: 700;
}
#killNum, #destroyNum {
  color: #ffffff; font-weight: 900;
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}

/* HUD button */
.hud-btn {
  padding: 7px 16px;
  background: rgba(80,0,0,0.55);
  border: 1px solid rgba(120,0,0,0.7);
  color: #ff5555; font-family: 'Rajdhani', 'Courier New', monospace;
  font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 2px;
  transition: all 0.12s;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.hud-btn:hover {
  background: rgba(160,0,0,0.72);
  border-color: rgba(200,0,0,0.9);
  box-shadow: 0 0 12px rgba(200,0,0,0.3);
  color: #ff9999;
}

/* ── FLASH MESSAGES ── */
.flash-msg {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.88);
  border: 1px solid rgba(160,0,0,0.7);
  border-top-color: rgba(220,0,0,0.8);
  color: #ff7700; padding: 10px 28px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.18em;
  border-radius: 2px; z-index: 200;
  text-shadow: 0 0 10px rgba(255,100,0,0.7);
  pointer-events: none;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.flash-msg.hidden { display: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: rgba(5,0,0,0.8); }
::-webkit-scrollbar-thumb { background: #440000; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #770000; }

/* ── ANIMATIONS ── */
@keyframes flicker {
  0%   { opacity: 1; }
  22%  { opacity: 0.95; }
  50%  { opacity: 0.88; }
  78%  { opacity: 0.96; }
  100% { opacity: 1; }
}
@keyframes bloodPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(180,0,0,0.45); }
  50%       { box-shadow: 0 0 55px rgba(255,0,0,0.6); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════
   IN-GAME OVERLAYS — Game Over / SWAT
════════════════════════════════════════════════════════════ */
.game-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.84);
  z-index: 200;
  animation: slideIn 0.3s ease;
}
.game-overlay.hidden { display: none; }

.overlay-inner {
  background: linear-gradient(180deg, rgba(14,5,5,0.99) 0%, rgba(6,2,2,1) 100%);
  border: 1px solid #550000;
  border-top: 1px solid #880000;
  border-radius: 2px;
  padding: 40px 52px;
  text-align: center;
  min-width: 360px;
  box-shadow: 0 0 70px rgba(160,0,0,0.5), inset 0 0 40px rgba(60,0,0,0.1);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  animation: bloodPulse 2.5s ease-in-out infinite;
}
.overlay-title {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: Impact, 'Arial Black', sans-serif;
}
.gameover-title {
  color: #cc2200;
  text-shadow: 0 0 28px #cc2200, 0 0 60px rgba(180,0,0,0.45);
}
.swat-title {
  color: #ffaa00;
  text-shadow: 0 0 28px #cc7700, 0 0 60px rgba(180,100,0,0.45);
}
.overlay-sub {
  color: #aa8888; font-size: 0.95rem;
  margin-bottom: 20px; font-style: italic;
}
.overlay-stats {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(80,0,0,0.5);
  border-radius: 2px;
  padding: 14px 22px;
  margin-bottom: 24px;
  font-size: 1rem;
  color: #e0d0d0;
  line-height: 1.9;
  text-align: left;
}
.swat-box { border-color: #885500; border-top-color: #cc8800; }
