/* Zombie Typer - Dark Zombie Survival Theme */

:root {
  --zt-bg-dark: #090d16;
  --zt-card-bg: rgba(15, 23, 42, 0.85);
  --zt-green: #22c55e;
  --zt-green-glow: rgba(34, 197, 94, 0.4);
  --zt-red: #ef4444;
  --zt-red-glow: rgba(239, 68, 68, 0.4);
  --zt-yellow: #eab308;
  --zt-cyan: #06b6d4;
  --zt-text-light: #f8fafc;
  --zt-text-muted: #94a3b8;
  --zt-border: rgba(255, 255, 255, 0.1);
  --zt-font-heading: 'Outfit', sans-serif;
  --zt-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

.zt-page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--zt-bg-dark);
  color: var(--zt-text-light);
  overflow-x: hidden;
}

.zt-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

/* Header & Nav overrides if needed */
.zt-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--zt-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-bottom: 1rem;
}

.zt-nav-back:hover {
  color: var(--zt-green);
}

/* Main Game Layout Container */
.zt-game-frame {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2rem auto;
  background: radial-gradient(circle at center, #111827 0%, #030712 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(34, 197, 94, 0.15);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Glassmorphic Top HUD */
.zt-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--zt-border);
  z-index: 10;
  position: relative;
}

.zt-hud-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.zt-hud-item {
  display: flex;
  flex-direction: column;
}

.zt-hud-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zt-text-muted);
}

.zt-hud-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--zt-font-mono);
  color: var(--zt-text-light);
}

.zt-hud-value.highlight {
  color: var(--zt-green);
  text-shadow: 0 0 8px var(--zt-green-glow);
}

/* Health Hearts */
.zt-hearts {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.zt-heart {
  font-size: 1.4rem;
  color: var(--zt-red);
  filter: drop-shadow(0 0 6px var(--zt-red-glow));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.zt-heart.lost {
  opacity: 0.25;
  filter: grayscale(1);
  transform: scale(0.85);
}

/* Canvas Viewport */
.zt-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 580px;
  background: #050811;
  cursor: crosshair;
  overflow: hidden;
}

@media (max-height: 700px) {
  .zt-canvas-wrapper {
    height: 480px;
  }
}

@media (max-width: 768px) {
  .zt-canvas-wrapper {
    height: 440px;
  }
}

#ztCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Alert Red Flash Overlay on Damage */
.zt-damage-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(239, 68, 68, 0) 40%, rgba(239, 68, 68, 0.45) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  z-index: 5;
}

.zt-damage-flash.active {
  opacity: 1;
}

/* Mobile Input Element (Invisible trigger) */
.zt-mobile-input {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Mobile Tap to Focus Bar */
.zt-mobile-bar {
  display: none;
  padding: 0.6rem 1rem;
  background: rgba(34, 197, 94, 0.15);
  border-top: 1px solid rgba(34, 197, 94, 0.3);
  text-align: center;
  font-size: 0.9rem;
  color: var(--zt-green);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 900px) {
  .zt-mobile-bar {
    display: block;
  }
}

/* Modal Overlays (Start, Pause, Game Over) */
.zt-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 20;
  text-align: center;
  transition: opacity 0.3s ease;
}

.zt-modal-overlay.hidden {
  display: none;
}

.zt-modal-card {
  max-width: 480px;
  width: 100%;
  background: var(--zt-card-bg);
  border: 1px solid var(--zt-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--zt-green-glow);
  animation: ztPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ztPopIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.zt-title-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.15);
  color: var(--zt-green);
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.zt-modal-title {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--zt-font-heading);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.zt-modal-subtitle {
  font-size: 0.95rem;
  color: var(--zt-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Primary Game Button */
.zt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #030712;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  transition: all 0.2s ease;
  width: 100%;
}

.zt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, #4ef081 0%, #22c55e 100%);
}

.zt-btn:active {
  transform: translateY(0);
}

.zt-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--zt-text-light);
  box-shadow: none;
  border: 1px solid var(--zt-border);
  margin-top: 0.75rem;
}

.zt-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

/* Stat Grid for Game Over */
.zt-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin: 1.25rem 0 1.5rem 0;
}

.zt-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
}

.zt-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--zt-font-mono);
  color: var(--zt-green);
}

.zt-stat-lbl {
  font-size: 0.75rem;
  color: var(--zt-text-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
}

/* Controls / Instructions list */
.zt-instructions {
  text-align: left;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.zt-instructions-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  color: var(--zt-text-muted);
}

.zt-instructions-item:last-child {
  margin-bottom: 0;
}

.zt-instructions-icon {
  color: var(--zt-green);
  font-size: 1.1rem;
}

/* Sound and Action Buttons */
.zt-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--zt-border);
  color: var(--zt-text-light);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zt-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--zt-green);
}

/* SEO Educational Article Content Section */
.zt-content-section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.25rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.zt-content-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 2rem 0 1rem 0;
  border-bottom: 2px solid rgba(34, 197, 94, 0.3);
  padding-bottom: 0.5rem;
}

.zt-content-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #4ade80;
  margin: 1.5rem 0 0.75rem 0;
}

.zt-content-section p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.zt-content-section ul,
.zt-content-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.zt-content-section li {
  margin-bottom: 0.5rem;
}

.zt-faq-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.zt-faq-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--zt-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.zt-faq-q {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--zt-green);
  margin-bottom: 0.5rem;
}

.zt-faq-a {
  color: var(--zt-text-muted);
  font-size: 0.98rem;
  margin-bottom: 0;
}