@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

:root {
  --dock-height: 0px;
  --green: #7fff00;
  --green-glow: rgba(127,255,0,0.35);
  --red: #ff3333;
  --gold: #ffd700;
  --pixel: 'Press Start 2P', monospace;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #060616;
}

/* ─── CANVAS ─── */
#bg {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  image-rendering: pixelated;
  z-index: 0;
}

/* ─── MOB LAYER ─── */
.mob-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* ─── MENU BAR ─── */
.menubar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 26px;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.menubar-left  { display: flex; align-items: center; gap: 22px; }
.menubar-logo  { font-family: var(--pixel); font-size: 9px; color: var(--green); letter-spacing: 1px; }
.menubar-item  { font-family: var(--pixel); font-size: 8px; color: rgba(255,255,255,0.65); cursor: default; }
.menubar-right { display: flex; align-items: center; gap: 16px; }
.menubar-battery { font-family: var(--pixel); font-size: 8px; color: var(--green); }
.menubar-time  { font-family: var(--pixel); font-size: 8px; color: rgba(255,255,255,0.8); }

/* ─── KILL FEED ─── */
.killfeed {
  position: fixed; top: 38px; right: 16px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 10; pointer-events: none;
}
.kf-item {
  background: rgba(0,0,0,0.72);
  border-left: 2px solid #ff3333;
  padding: 4px 10px;
  font-family: var(--pixel); font-size: 7px;
  color: #ddd; white-space: nowrap;
}

/* ─── SOUND HINT ─── */
.sound-hint {
  position: fixed; bottom: 84px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--pixel); font-size: 7px;
  color: rgba(255,255,255,0.45);
  z-index: 20; pointer-events: none;
  white-space: nowrap;
  animation: hint-fade 4s 1.5s ease-out forwards;
}
@keyframes hint-fade { 0%{opacity:1} 100%{opacity:0} }

/* ─── CENTER CARD ─── */
.center-card {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(0,0,0,0.80);
  border: 2px solid rgba(127,255,0,0.55);
  padding: 44px 52px 38px;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 4px rgba(0,0,0,0.4),
    0 0 80px rgba(0,0,0,0.7),
    0 0 40px rgba(127,255,0,0.08);
  min-width: 300px;
  max-width: 88vw;
}
.cc-badge {
  font-family: var(--pixel); font-size: 7px;
  color: rgba(127,255,0,0.55);
  margin-bottom: 16px; letter-spacing: 1px;
}
.cc-title {
  font-family: var(--pixel); font-size: clamp(14px, 3vw, 24px);
  color: var(--green);
  text-shadow: 0 0 30px var(--green-glow), 0 0 60px rgba(127,255,0,0.1);
  margin-bottom: 16px; letter-spacing: 2px;
}
.cc-sub {
  font-family: var(--pixel); font-size: clamp(8px, 1.4vw, 11px);
  color: rgba(255,255,255,0.55); line-height: 2.2;
  margin-bottom: 30px;
}
.btn-buy {
  display: block; width: 100%;
  background: var(--green); color: #000;
  font-family: var(--pixel); font-size: clamp(8px, 1.2vw, 11px);
  padding: 18px 28px;
  border: none; cursor: pointer;
  transition: box-shadow .2s, transform .1s;
  box-shadow: 0 0 30px var(--green-glow);
  margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.btn-buy::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-100%); transition: transform .5s;
}
.btn-buy:hover::after { transform: translateX(100%); }
.btn-buy:hover { box-shadow: 0 0 50px var(--green-glow); transform: translateY(-2px); }
.btn-buy:active { transform: translateY(0); }

.cc-features {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: 16px;
}
.cc-features span {
  font-family: var(--pixel); font-size: 7px;
  color: rgba(255,255,255,0.4);
  padding: 4px 8px;
  border: 1px solid rgba(127,255,0,0.12);
}
.cc-note {
  font-family: var(--pixel); font-size: 6px;
  color: rgba(255,255,255,0.22); line-height: 2;
}

/* ─── HUD OVERLAY ─── */
.hud-overlay {
  position: fixed; bottom: var(--dock-height); left: 0; right: 0;
  z-index: 15;
  padding: 7px 20px 10px;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-top: 1px solid rgba(127,255,0,0.12);
}
.hud-row {
  display: flex; justify-content: space-between;
  margin-bottom: 5px; align-items: center; position: relative;
}
.hearts { display: flex; gap: 3px; }
.h { font-size: clamp(16px, 2.8vw, 22px); line-height: 1; }
.h.on   { color: #ff3333; filter: drop-shadow(0 0 5px rgba(255,0,0,0.7)); }
.h.half { color: #ff8888; }
.h.off  { color: #330000; }
.foods  { display: flex; gap: 2px; flex-direction: row-reverse; }
.f { font-size: clamp(14px, 2.5vw, 20px); line-height: 1; }
.f.on  { filter: saturate(1.5) drop-shadow(0 0 3px rgba(255,150,0,0.5)); }
.f.off { filter: saturate(0) opacity(0.3); }

.xp-popup {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--pixel); font-size: 9px;
  color: var(--green); text-shadow: 0 0 10px var(--green-glow);
  pointer-events: none; white-space: nowrap;
}
@keyframes float-up {
  0%   { opacity:1; transform: translateX(-50%) translateY(0); }
  100% { opacity:0; transform: translateX(-50%) translateY(-28px); }
}
.xp-wrap { position: relative; }
.xp-track {
  height: 7px; background: #111; border: 1px solid #222;
  margin-bottom: 3px; position: relative; overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #4aff00, #7fff00);
  box-shadow: 0 0 8px rgba(127,255,0,0.8);
  width: 0%; transition: width 1.5s cubic-bezier(0.16,1,0.3,1);
}
.xp-shine {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.25);
}
.xp-text {
  font-family: var(--pixel); font-size: 7px;
  color: var(--green); text-align: center;
}

/* ─── WALKING MOBS ─── */
.mob {
  position: absolute;
  pointer-events: none;
}
.mob-sprite {
  display: block;
  image-rendering: pixelated;
  width: clamp(40px, 6vw, 64px);
  height: auto;
}
.mob.rtl .mob-sprite { transform: scaleX(-1); }
.mob-inner {
  display: inline-block;
  animation: mob-bob 0.28s ease-in-out infinite alternate;
}
@keyframes mob-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}

/* ─── macOS DOCK ─── */
.mac-dock {
  position: fixed;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 20px;
  padding: 6px 12px 8px;
  box-shadow:
    0 4px 32px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.18);
}
.dock-inner {
  display: flex; align-items: flex-end; gap: 4px;
}
.dock-app {
  width: 52px; height: 52px;
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease;
  position: relative;
  border-radius: 12px;
  user-select: none;
}
.dock-app:hover { background: rgba(255,255,255,0.1); }
.dock-app.running::after {
  content: '';
  position: absolute; bottom: -5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
}
.dock-sep {
  width: 1px; height: 42px;
  background: rgba(255,255,255,0.22);
  margin: 0 4px; align-self: center;
}
@keyframes dock-bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-20px); }
  60%  { transform: translateY(-8px); }
  80%  { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}

/* ─── Windows 11 TASKBAR ─── */
.win-taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  z-index: 25;
  background: rgba(20,20,28,0.88);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center;
  padding: 0 12px;
  gap: 8px;
}
.win-start {
  font-size: 20px; padding: 6px 10px;
  color: #fff; cursor: pointer; border-radius: 6px;
  transition: background .15s;
}
.win-start:hover { background: rgba(255,255,255,0.12); }
.win-apps {
  flex: 1; display: flex; align-items: center;
  justify-content: center; gap: 4px;
}
.win-app {
  width: 40px; height: 40px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  transition: background .15s; position: relative;
  user-select: none;
}
.win-app:hover { background: rgba(255,255,255,0.1); }
.win-app.running::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 3px;
  background: #60cdff; border-radius: 2px;
}
.win-tray {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px; border-radius: 6px;
  transition: background .15s; cursor: pointer;
}
.win-tray:hover { background: rgba(255,255,255,0.08); }
.win-tray span { font-size: 14px; }
.win-clock {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 1px;
  font-family: 'Segoe UI', sans-serif; font-size: 11px;
  color: rgba(255,255,255,0.85); line-height: 1.3;
}

/* ─── Linux GNOME TASKBAR ─── */
.linux-taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  z-index: 25;
  background: #2d2d2d;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center;
  padding: 0 12px;
}
.linux-left { display: flex; align-items: center; }
.linux-activities {
  font-family: 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.85);
  padding: 6px 12px; cursor: pointer; border-radius: 4px;
  transition: background .15s;
}
.linux-activities:hover { background: rgba(255,255,255,0.12); }
.linux-center {
  flex: 1; display: flex; align-items: center;
  justify-content: center; gap: 4px;
}
.linux-app {
  width: 40px; height: 40px; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  transition: background .15s; position: relative;
  user-select: none;
}
.linux-app:hover { background: rgba(255,255,255,0.1); }
.linux-app.running::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: #ff7b29; border-radius: 50%;
}
.linux-right {
  display: flex; align-items: center; gap: 12px;
}
.linux-indicators { font-size: 14px; color: rgba(255,255,255,0.7); }
.linux-clock {
  font-family: 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 13px; color: rgba(255,255,255,0.85);
  min-width: 44px; text-align: right;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .center-card { padding: 30px 22px 26px; min-width: 260px; }
  .cc-features { gap: 6px; }
  .menubar-item { display: none; }
  .killfeed { right: 8px; }
}
