/* ==========================================================================
   CYBERDELINQUENTS.COM - DUNGEON CRAWLER CARL LITRPG DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600;700&family=Orbitron:wght@500;700;900&family=Outfit:wght@300;400;600;800&family=Russo+One&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #07090e;
  --bg-card: rgba(14, 18, 28, 0.82);
  --bg-card-hover: rgba(22, 28, 44, 0.9);
  --bg-hud: rgba(10, 14, 22, 0.95);
  
  --neon-magenta: #ff007f;
  --neon-magenta-glow: rgba(255, 0, 127, 0.5);
  --neon-cyan: #00f3ff;
  --neon-cyan-glow: rgba(0, 243, 255, 0.4);
  --neon-gold: #ffb700;
  --neon-gold-glow: rgba(255, 183, 0, 0.4);
  --neon-green: #00ff66;
  --neon-green-glow: rgba(0, 255, 102, 0.3);
  --neon-red: #ff3344;
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  
  --border-neon: 1px solid rgba(0, 243, 255, 0.3);
  --border-magenta: 1px solid rgba(255, 0, 127, 0.4);
  --border-gold: 1px solid rgba(255, 183, 0, 0.4);
  
  --font-heading: 'Orbitron', 'Russo One', sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Screen-reader-only utility — visually hidden but announced by assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 0, 127, 0.12), transparent 45%),
    radial-gradient(circle at 10% 40%, rgba(0, 243, 255, 0.08), transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(255, 183, 0, 0.06), transparent 40%),
    linear-gradient(to bottom, rgba(7, 9, 14, 0.95), rgba(7, 9, 14, 0.98));
  background-attachment: fixed;
}

/* iOS Safari: background-attachment:fixed causes scroll jank — fall back to scroll */
@supports (-webkit-touch-callout: none) {
  body { background-attachment: scroll; }
}

/* Cyber Overlay Grid & Scanline Effect */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #080a10;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-magenta);
}

/* Typography Utility Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-bright);
}

.text-magenta { color: var(--neon-magenta); text-shadow: 0 0 10px var(--neon-magenta-glow); }
.text-cyan { color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan-glow); }
.text-gold { color: var(--neon-gold); text-shadow: 0 0 10px var(--neon-gold-glow); }
.text-green { color: var(--neon-green); text-shadow: 0 0 10px var(--neon-green-glow); }

/* Glitch Title Animation */
.glitch-title {
  position: relative;
  display: inline-block;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 15px var(--neon-cyan-glow), 0 0 30px var(--neon-magenta-glow);
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: rect(0, 0, 0, 0);
}

.glitch-title:hover::before {
  left: 2px;
  text-shadow: -2px 0 var(--neon-magenta);
  clip-path: rect(10px, 9999px, 44px, 0);
  animation: glitch-anim 1.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip-path: rect(12px, 9999px, 30px, 0); transform: skew(0.3deg); }
  20% { clip-path: rect(40px, 9999px, 80px, 0); transform: skew(-0.5deg); }
  40% { clip-path: rect(5px, 9999px, 60px, 0); transform: skew(0.2deg); }
  60% { clip-path: rect(25px, 9999px, 90px, 0); transform: skew(-0.3deg); }
  80% { clip-path: rect(50px, 9999px, 20px, 0); transform: skew(0.5deg); }
  100% { clip-path: rect(10px, 9999px, 70px, 0); transform: skew(0deg); }
}

/* Structural Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Header */
.hud-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-neon);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-badge {
  background: linear-gradient(135deg, var(--neon-magenta), #99004d);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 0 10px var(--neon-magenta-glow);
}

.logo-text {
  font-size: 1.4rem;
  letter-spacing: 2px;
}

/* Dungeon Status Ticker */
.dungeon-ticker {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(0, 243, 255, 0.05);
  border: 1px solid rgba(0, 243, 255, 0.2);
  padding: 0.4rem 1rem;
  border-radius: 20px;
}

@media (max-width: 900px) {
  .dungeon-ticker { display: none; }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Nav Action Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-btn {
  background: rgba(18, 24, 38, 0.8);
  border: 1px solid rgba(0, 243, 255, 0.3);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hud-btn:hover {
  background: rgba(0, 243, 255, 0.15);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 15px var(--neon-cyan-glow);
  transform: translateY(-2px);
}

.hud-btn-magenta {
  border-color: rgba(255, 0, 127, 0.4);
  color: #ffa6d4;
}

.hud-btn-magenta:hover {
  background: rgba(255, 0, 127, 0.2);
  border-color: var(--neon-magenta);
  color: #fff;
  box-shadow: 0 0 15px var(--neon-magenta-glow);
}

.hud-btn-gold {
  border-color: rgba(255, 183, 0, 0.4);
  color: #ffe699;
}

.hud-btn-gold:hover {
  background: rgba(255, 183, 0, 0.2);
  border-color: var(--neon-gold);
  color: #fff;
  box-shadow: 0 0 15px var(--neon-gold-glow);
}

/* AI System Announcement Banner */
.system-ai-banner {
  margin: 1.5rem 0 2rem 0;
  position: relative;
}

.system-ai-card {
  background: linear-gradient(135deg, rgba(20, 12, 28, 0.95), rgba(10, 14, 24, 0.95));
  border: 2px solid var(--neon-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  position: relative;
  box-shadow: 0 0 25px var(--neon-gold-glow), inset 0 0 15px rgba(255, 183, 0, 0.1);
  overflow: hidden;
}

.system-ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: var(--neon-gold);
  box-shadow: 0 0 10px var(--neon-gold);
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ai-title-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--neon-gold);
  letter-spacing: 1px;
}

.ai-speaker-icon {
  font-size: 1.2rem;
  animation: pulse-speak 1s infinite alternate;
}

@keyframes pulse-speak {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

.ai-content {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.ai-content .achievement-name {
  color: var(--neon-gold);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ai-reward-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: rgba(255, 183, 0, 0.1);
  border: 1px dashed rgba(255, 183, 0, 0.4);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: #ffe699;
  margin-top: 0.5rem;
}

.ai-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* HERO SECTION - CENTRAL IMAGE SHOWCASE */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
}

.central-stage {
  position: relative;
  background: var(--bg-card);
  border: var(--border-magenta);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 0 30px rgba(255, 0, 127, 0.25);
  backdrop-filter: blur(12px);
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stage-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stage-title h2 {
  font-size: 1.25rem;
  color: var(--neon-magenta);
}

.floor-badge {
  background: rgba(0, 243, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Image HUD Frame */
.image-hud-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.7);
  border: 2px solid rgba(0, 243, 255, 0.4);
}

.central-image {
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.central-image.spotlight-active {
  filter: brightness(0.6) contrast(1.2);
}

/* HUD Overlay Frame Elements */
.hud-corner-tl, .hud-corner-tr, .hud-corner-bl, .hud-corner-br {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--neon-cyan);
  border-style: solid;
  pointer-events: none;
  z-index: 10;
}
.hud-corner-tl { top: 10px; left: 10px; border-width: 3px 0 0 3px; }
.hud-corner-tr { top: 10px; right: 10px; border-width: 3px 3px 0 0; }
.hud-corner-bl { bottom: 10px; left: 10px; border-width: 0 0 3px 3px; }
.hud-corner-br { bottom: 10px; right: 10px; border-width: 0 3px 3px 0; }

.reticle-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  border: 1px dashed rgba(0, 243, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s;
}

.reticle-center.active {
  opacity: 1;
  animation: spin-reticle 10s infinite linear;
}

@keyframes spin-reticle {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Interactive Hotspot Pins — now semantic <button> elements */
.hotspot-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 0, 127, 0.85);
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 0 15px var(--neon-magenta-glow);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Button resets */
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
  padding: 0;
}

/* Invisible tap-target expansion — effective size becomes ~48×48px on mobile */
.hotspot-pin::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

/* Ping ripple animation uses ::after */
.hotspot-pin::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--neon-magenta);
  animation: ping-pin 2s infinite;
  pointer-events: none;
}

@keyframes ping-pin {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hotspot-pin:hover, .hotspot-pin:focus-visible, .hotspot-pin.active {
  transform: scale(1.3);
  background: var(--neon-cyan);
  border-color: #fff;
  box-shadow: 0 0 20px var(--neon-cyan-glow);
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

/* Hotspot Placement Percentages on Central Image */
.pin-orc { top: 38%; left: 45%; }
.pin-crawler { top: 48%; left: 75%; }
.pin-tourists { top: 44%; left: 12%; }
.pin-guinness { top: 72%; left: 22%; }
.pin-rain { top: 22%; left: 78%; }

/* Hotspot Scan Card Overlay (desktop floating panel) */
.hotspot-card {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: rgba(10, 14, 24, 0.95);
  border: 2px solid var(--neon-cyan);
  border-radius: var(--radius-md);
  padding: 0;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px var(--neon-cyan-glow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  /* Desktop: cap height and allow scrolling inside the card */
  max-height: 55%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.hotspot-card.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Sticky card header — always visible while scrolling card content */
.hotspot-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(10, 14, 24, 0.98);
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hotspot-title {
  color: var(--neon-cyan);
  font-size: 1.1rem;
}

/* Card body padding (stats grid + description) */
.hotspot-stats,
#hotspot-desc {
  padding: 0 1.25rem;
}

#hotspot-desc {
  padding-bottom: 1.25rem;
}

.hotspot-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  /* Minimum 44×44px touch target (Apple HIG / WCAG 2.5.5) */
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.hotspot-close:hover,
.hotspot-close:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.08);
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.hotspot-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.stat-tag {
  background: rgba(0, 243, 255, 0.08);
  border: 1px solid rgba(0, 243, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Control Panel for Hero Stage */
.stage-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Sidebar HUD Panel */
.sidebar-hud {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hud-panel {
  background: var(--bg-card);
  border: var(--border-neon);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hud-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-panel-title {
  font-size: 0.95rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Progress / Stat Bars */
.stat-group {
  margin-bottom: 0.85rem;
}

.stat-label-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.bar-outer {
  height: 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  position: relative;
}

.bar-fill-hp {
  background: linear-gradient(90deg, #ff0055, #ff3300);
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
}

.bar-fill-mana {
  background: linear-gradient(90deg, #00c3ff, #00ffaa);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.bar-fill-delinquency {
  background: linear-gradient(90deg, #d400ff, #ff007f);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

/* Chaos Rating Specialty Display */
.chaos-rating-box {
  background: linear-gradient(135deg, rgba(255, 0, 127, 0.15), rgba(0, 243, 255, 0.08));
  border: 1px dashed var(--neon-magenta);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 1rem;
}

.chaos-score {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--neon-magenta);
  text-shadow: 0 0 15px var(--neon-magenta-glow);
}

.chaos-comment {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* PRINCESS DONUT & MONGO CORNER */
.donut-section {
  background: linear-gradient(135deg, rgba(30, 15, 35, 0.9), rgba(15, 20, 35, 0.9));
  border: 2px solid var(--neon-magenta);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 0 30px var(--neon-magenta-glow);
  position: relative;
  overflow: hidden;
}

.donut-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 640px) {
  .donut-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.cat-crown-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-gold), var(--neon-magenta));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  box-shadow: 0 0 25px var(--neon-gold-glow);
  border: 3px solid #fff;
  margin: 0 auto;
  position: relative;
}

.cat-crown-avatar::after {
  content: '👑';
  position: absolute;
  top: -15px;
  font-size: 2rem;
}

.donut-speech-bubble {
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--neon-magenta);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
}

.donut-speech-bubble::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 12px 6px 0;
  border-style: solid;
  border-color: transparent var(--neon-magenta) transparent transparent;
}

@media (max-width: 640px) {
  .donut-speech-bubble::before { display: none; }
}

.donut-quote {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.donut-signature {
  font-family: var(--font-heading);
  color: var(--neon-gold);
  font-size: 0.85rem;
}

.mongo-banner {
  margin-top: 1rem;
  background: rgba(255, 0, 127, 0.15);
  border: 1px solid var(--neon-magenta);
  color: var(--neon-magenta);
  font-family: var(--font-heading);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
}



/* ACHIEVEMENTS & LOOT GRID */
.grid-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .grid-two-col {
    grid-template-columns: 1fr;
  }
}

.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.achievement-item {
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-fast);
}

.achievement-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: 0 0 15px var(--neon-gold-glow);
}

.achievement-icon {
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  background: rgba(255, 183, 0, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--neon-gold);
}

.achievement-details h4 {
  font-size: 0.95rem;
  color: var(--neon-gold);
}

.achievement-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Inventory Item Slots */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.item-slot {
  background: rgba(12, 16, 26, 0.9);
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  /* Button element resets */
  font-family: inherit;
  color: inherit;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.item-slot:hover,
.item-slot:focus-visible {
  border-color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.15);
  box-shadow: 0 0 15px var(--neon-cyan-glow);
  transform: scale(1.05);
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

.item-slot-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.item-slot-name {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-align: center;
  color: var(--text-main);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 7, 12, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  /* Allow the overlay itself to scroll on small screens */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-hud);
  border: 2px solid var(--neon-cyan);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 0 40px var(--neon-cyan-glow);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  /* Ensure it doesn't overflow the viewport height */
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Prevent content from causing layout to break on iOS */
  position: relative;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

/* Prevent background page scrolling while modal is open */
body.modal-open {
  overflow: hidden;
  /* iOS Safari fix: prevent rubber-band scrolling on the body */
  position: fixed;
  width: 100%;
}

/* On very small screens, align modal to top so it's reachable */
@media (max-height: 600px), (max-width: 480px) {
  .modal-overlay {
    align-items: flex-start;
    padding: 1rem;
  }
  .modal-container {
    max-height: none;
    margin: 0 auto;
  }
}

/* Footer */
.dungeon-footer {
  border-top: var(--border-neon);
  background: rgba(5, 7, 12, 0.95);
  padding: 2.5rem 0;
  margin-top: 4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--neon-cyan);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
  color: var(--neon-magenta);
}

/* Utility Animations */
.pulse-glow {
  animation: pulse-glow-anim 2s infinite alternate;
}

@keyframes pulse-glow-anim {
  from { box-shadow: 0 0 10px var(--neon-magenta-glow); }
  to { box-shadow: 0 0 25px var(--neon-magenta-glow); }
}
