/* 
  NEON BOROUGH: Block Chronicles — UNDERTALE & DELTARUNE RETRO RPG DESIGN SYSTEM
  - Iconic Pitch Black Undertale Dialogue Boxes (4px White Borders)
  - Determination Red (❤️), Soul Yellow (#ffff00), Save Point Green (#00ff88), Magic Cyan (#00e5ff)
  - High-Quality Crisp Pixel Rendering for Characters & Media
  - Retro Menu Buttons: [FIGHT], [ACT], [ITEM], [MERCY]
*/

:root {
  --bg-dark: #000000;
  --bg-card: #0c0c12;
  --bg-card-hover: #151522;
  --bg-panel: #101018;
  
  --white: #ffffff;
  --white-dim: #d5d5e0;
  --gray: #888899;
  --dark-gray: #1a1a24;
  --black: #000000;

  /* Undertale & Deltarune Palette */
  --undertale-red: #ff2a2a;
  --undertale-yellow: #ffff00;
  --undertale-green: #00ff88;
  --undertale-cyan: #00e5ff;
  --undertale-purple: #b84dff;
  --undertale-orange: #ff9f43;

  /* Color Aliases */
  --emerald: var(--undertale-green);
  --emerald-dark: #00aa55;
  --emerald-glow: rgba(0, 255, 136, 0.4);
  
  --gold: var(--undertale-yellow);
  --gold-dark: #ccaa00;
  --gold-glow: rgba(255, 255, 0, 0.4);

  --diamond: var(--undertale-cyan);
  --cyan: var(--undertale-cyan);
  --redstone: var(--undertale-red);
  --redstone-dark: #cc1111;
  --purple: var(--undertale-purple);
  --purple-dark: #8811cc;
  
  --text-main: #ffffff;
  --text-muted: #b8b8cc;
  --text-dim: #787888;
  
  --border-line: #333344;
  --border-block: 4px solid #ffffff;
  
  --font-pixel: 'Press Start 2P', monospace;
  --font-retro: 'VT323', monospace;
  --font-body: 'VT323', monospace;
  
  --shadow-block: 5px 5px 0px #ffffff;
  --shadow-block-lg: 8px 8px 0px #ffffff;
  --shadow-block-sm: 3px 3px 0px #ffffff;

  --accent-theme: var(--undertale-yellow);
  --glow-theme: rgba(255, 255, 0, 0.3);
}

/* Crisp High-Quality Pixel Art Rendering (No heavy blur, rich colors) */
img, canvas, svg, video, .char-avatar-img, .boss-avatar-stage, .hero-cape, .voxel-card {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: contrast(115%) saturate(135%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Authentic Undertale Sharp Square Edges */
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-retro);
  font-size: 24px;
  line-height: 1.45;
  overflow-x: hidden;
  position: relative;
}

/* Subtle CRT TV Scanline Overlay */
body::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 24, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.45;
}

/* Background Starfield Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.wrap {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Undertale Highlight Color Classes */
.text-gold { color: var(--undertale-yellow) !important; text-shadow: 0 0 8px rgba(255,255,0,0.4); }
.text-emerald { color: var(--undertale-green) !important; text-shadow: 0 0 8px rgba(0,255,136,0.4); }
.text-cyan { color: var(--undertale-cyan) !important; text-shadow: 0 0 8px rgba(0,229,255,0.4); }
.text-redstone { color: var(--undertale-red) !important; text-shadow: 0 0 8px rgba(255,42,42,0.4); }
.text-purple { color: var(--undertale-purple) !important; }

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: #000000;
  border-bottom: 4px solid #ffffff;
  z-index: 100;
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 46px;
  height: 46px;
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 3px 3px 0px var(--undertale-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.15s;
}

.brand-logo:hover .brand-icon {
  transform: scale(1.08);
  box-shadow: 4px 4px 0px var(--undertale-yellow);
}

.brand-text {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.brand-sub {
  font-size: 9px;
  color: var(--undertale-yellow);
  letter-spacing: 2px;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  gap: 12px;
  list-style: none;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 1;
}

.nav-links li {
  display: contents; /* li sarmalayıcısını kaldır, a doğrudan flex item olsun */
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #000000;
  border: 3px solid #ffffff;
  padding: 3px;
  box-shadow: 3px 3px 0px var(--undertale-cyan);
  flex-shrink: 0;
}

.lang-btn {
  background: #000000;
  border: 2px solid transparent;
  color: #b8b8cc;
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 5px 9px;
  cursor: pointer;
  transition: all 0.1s ease;
  line-height: 1;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.lang-btn:hover {
  background: #222233;
  color: #ffffff;
  border-color: #ffffff;
}

.lang-btn.active {
  background: var(--undertale-cyan);
  color: #000000;
  font-weight: bold;
  border-color: #ffffff;
}

.nav-links a {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: #b8b8cc;
  text-decoration: none;
  transition: all 0.1s ease;
  padding: 6px 10px;
  border: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--undertale-yellow);
  background: #000000;
  border-color: #ffffff;
  box-shadow: 3px 3px 0px var(--undertale-red);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Biome Switcher */
.biome-switcher {
  display: flex;
  background: #000000;
  border: 3px solid #ffffff;
  padding: 2px;
  gap: 4px;
  box-shadow: 3px 3px 0px var(--undertale-cyan);
}

.biome-btn {
  background: #000000;
  border: 1px solid #333333;
  color: #ffffff;
  font-size: 14px;
  padding: 4px 8px;
  cursor: pointer;
}

.biome-btn:hover { background: #222233; }
.biome-btn.active {
  background: var(--undertale-yellow);
  color: #000000;
  font-weight: bold;
}

.sfx-btn, .bgm-btn {
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 3px 3px 0px var(--undertale-yellow);
  color: var(--undertale-yellow);
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--font-pixel);
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sfx-btn:hover, .bgm-btn:hover {
  background: var(--undertale-yellow);
  color: #000000;
}

.nav-cta {
  background: var(--undertale-red);
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 10px 16px;
  text-decoration: none;
  border: 3px solid #ffffff;
  box-shadow: 4px 4px 0px var(--undertale-yellow);
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.nav-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #ffffff;
  background: var(--undertale-yellow);
  color: #000000;
}

.online-badge {
  background: #000000;
  border: 3px solid #ffffff;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--undertale-green);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 3px 3px 0px var(--undertale-green);
}

.online-dot {
  width: 8px;
  height: 8px;
  background: var(--undertale-green);
  box-shadow: 0 0 8px var(--undertale-green);
  animation: soul-blink 1s infinite steps(1);
}

@keyframes soul-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 840px;
  padding-top: 140px;
  padding-bottom: 75px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 50% 20%, rgba(255, 42, 42, 0.15) 0%, transparent 60%), #000000;
  border-bottom: 4px solid #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000000;
  border: 3px solid #ffffff;
  padding: 6px 16px;
  color: var(--undertale-red);
  font-family: var(--font-pixel);
  font-size: 9px;
  margin-bottom: 22px;
  box-shadow: 4px 4px 0px var(--undertale-yellow);
}

.hero-title {
  font-family: var(--font-pixel);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.25;
  color: #ffffff;
  text-shadow: 4px 4px 0px #000000, 7px 7px 0px rgba(255, 42, 42, 0.5);
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--undertale-yellow);
  display: block;
}

.hero-subtitle {
  font-family: var(--font-retro);
  font-size: 34px;
  color: var(--undertale-green);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.hero-desc {
  font-family: var(--font-retro);
  font-size: 23px;
  color: #d5d5e0;
  max-width: 600px;
  margin-bottom: 34px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 42px;
}

.btn-primary {
  background: #000000;
  color: var(--undertale-yellow);
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: bold;
  padding: 16px 26px;
  text-decoration: none;
  border: 4px solid var(--undertale-orange);
  box-shadow: 5px 5px 0px var(--undertale-red);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.1s ease;
}

.btn-primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px #ffffff;
  background: var(--undertale-orange);
  color: #000000;
  border-color: #ffffff;
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #ffffff;
}

.btn-secondary {
  background: #000000;
  color: var(--undertale-cyan);
  font-family: var(--font-pixel);
  font-size: 11px;
  font-weight: bold;
  padding: 16px 26px;
  text-decoration: none;
  border: 4px solid var(--undertale-cyan);
  box-shadow: 5px 5px 0px #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.1s ease;
}

.btn-secondary:hover {
  background: var(--undertale-cyan);
  color: #000000;
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px var(--undertale-yellow);
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 600px;
}

.hero-stat-card {
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 4px 4px 0px var(--undertale-cyan);
  padding: 14px;
  text-align: center;
}

.hero-stat-card b {
  display: block;
  font-family: var(--font-retro);
  font-size: 40px;
  color: var(--undertale-yellow);
  line-height: 1;
}

.hero-stat-card span {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b8b8cc;
  margin-top: 6px;
  display: block;
}

/* Undertale Voxel Showcase Card */
.voxel-card {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: 8px 8px 0px var(--undertale-red);
  padding: 30px;
  position: relative;
  text-align: center;
}

.voxel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 3px dashed #ffffff;
  padding-bottom: 12px;
}

.voxel-title {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--undertale-yellow);
}

.voxel-level {
  background: var(--undertale-purple);
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 8px;
  font-weight: bold;
  padding: 4px 8px;
  border: 2px solid #ffffff;
  box-shadow: 2px 2px 0px #000000;
}

/* 3D CSS Block Character Canvas */
.character-display-stage {
  height: 290px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.css-block-character {
  width: 130px;
  height: 240px;
  position: relative;
  transform-style: preserve-3d;
  animation: float-idle 3s ease-in-out infinite;
}

@keyframes float-idle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-cape {
  position: absolute;
  top: 60px;
  left: 10px;
  width: 100px;
  height: 140px;
  background: linear-gradient(180deg, #7a152b 0%, #aa1a3d 100%);
  border: 3px solid #000000;
  z-index: 0;
}

.block-head {
  width: 80px;
  height: 80px;
  background: #232a3b;
  border: 3px solid #000000;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.block-helmet {
  position: absolute;
  top: -12px;
  left: -8px;
  width: 96px;
  height: 42px;
  background: linear-gradient(180deg, var(--undertale-yellow) 0%, #cc9900 100%);
  border: 3px solid #000000;
}

.helmet-horns {
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.helmet-horns::before, .helmet-horns::after {
  content: '';
  width: 16px;
  height: 18px;
  background: var(--undertale-yellow);
  border: 2px solid #000000;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.block-eyes {
  position: absolute;
  top: 36px;
  left: 12px;
  width: 56px;
  height: 14px;
  display: flex;
  justify-content: space-between;
}

.block-eye {
  width: 18px;
  height: 14px;
  background: #000000;
  border: 2px solid #000000;
  position: relative;
}

.block-eye::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--undertale-cyan);
  box-shadow: 0 0 8px var(--undertale-cyan);
}

.block-chest {
  width: 96px;
  height: 76px;
  background: linear-gradient(180deg, #2f3640 0%, #1e272e 100%);
  border: 3px solid #000000;
  margin: -4px auto 0;
  position: relative;
  z-index: 2;
}

.chest-plate {
  position: absolute;
  inset: 6px;
  border: 2px solid var(--undertale-yellow);
}

.chest-gem {
  position: absolute;
  top: 14px;
  left: 26px;
  width: 36px;
  height: 36px;
  background: var(--undertale-green);
  border: 2px solid #000000;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 10px var(--undertale-green);
}

.block-arm {
  position: absolute;
  top: 66px;
  width: 24px;
  height: 76px;
  background: #2f3640;
  border: 3px solid #000000;
  z-index: 3;
}

.arm-pauldron {
  position: absolute;
  top: -12px;
  left: -6px;
  width: 32px;
  height: 22px;
  background: var(--undertale-yellow);
  border: 2px solid #000000;
}

.arm-left { left: -4px; }
.arm-right { right: -4px; }

.hero-weapon {
  position: absolute;
  right: -32px;
  top: 15px;
  font-size: 38px;
  filter: drop-shadow(0 0 10px var(--undertale-cyan));
}

.block-belt {
  width: 96px;
  height: 16px;
  background: var(--undertale-yellow);
  border: 3px solid #000000;
  margin: -4px auto 0;
  position: relative;
  z-index: 2;
}

.block-legs {
  width: 88px;
  height: 70px;
  margin: -4px auto 0;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.block-leg {
  width: 40px;
  height: 70px;
  background: #1e272e;
  border: 3px solid #000000;
  position: relative;
}

.leg-armor {
  position: absolute;
  top: 12px;
  left: 2px;
  right: 2px;
  height: 24px;
  background: var(--undertale-yellow);
  border: 1px solid #000000;
}

.pedestal-3d {
  width: 210px;
  height: 42px;
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 4px 4px 0px var(--undertale-yellow);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pedestal-3d::before {
  content: 'MYTHIC ARMORED HERO';
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--undertale-yellow);
}

.skin-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.skin-opt {
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff;
  box-shadow: 3px 3px 0px #000000;
  cursor: pointer;
  transition: transform 0.15s;
}

.skin-opt:hover { transform: scale(1.15); }
.skin-opt.active { border-color: var(--undertale-yellow); box-shadow: 0 0 12px var(--undertale-yellow); }

/* Ticker Marquee Ribbon */
.marquee-ribbon {
  background: var(--undertale-yellow);
  color: #000000;
  border-top: 4px solid #ffffff;
  border-bottom: 4px solid #ffffff;
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

.marquee-content {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 10px;
  font-weight: bold;
  animation: marquee-roll 30s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-right: 40px;
}

.marquee-item span {
  color: var(--undertale-red);
}

@keyframes marquee-roll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

/* Common Section Layouts */
section {
  padding: 95px 0;
  position: relative;
  z-index: 1;
}

.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

.section-eyebrow {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--undertale-yellow);
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: inline-block;
  background: #000000;
  padding: 6px 14px;
  border: 3px solid #ffffff;
  box-shadow: 4px 4px 0px var(--undertale-red);
}

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 3.2vw, 36px);
  color: #ffffff;
  line-height: 1.3;
  text-shadow: 3px 3px 0px #000000, 6px 6px 0px rgba(255, 42, 42, 0.4);
  margin-bottom: 16px;
}

.section-sub {
  font-family: var(--font-retro);
  font-size: 26px;
  color: var(--undertale-green);
}

/* Features Grid */
.features-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.feature-card {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px var(--undertale-yellow);
  background: #141420;
}

.feature-number {
  position: absolute;
  right: 10px;
  bottom: -10px;
  font-family: var(--font-pixel);
  font-size: 70px;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  font-weight: bold;
}

.feature-icon-box {
  width: 56px;
  height: 56px;
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 3px 3px 0px var(--undertale-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  color: var(--undertale-yellow);
}

.feature-card h3 {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--undertale-yellow);
  margin-bottom: 12px;
  line-height: 1.4;
}

.feature-card p {
  font-family: var(--font-retro);
  font-size: 22px;
  color: #b8b8cc;
  line-height: 1.4;
}

/* CRAFTING BENCH SANDBOX SECTION */
.crafting-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.crafting-container {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.crafting-bench-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.crafting-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 82px);
  grid-template-rows: repeat(3, 82px);
  gap: 12px;
  background: #000000;
  padding: 16px;
  border: 4px solid #ffffff;
  box-shadow: 5px 5px 0px var(--undertale-purple);
  position: relative;
}

.craft-slot {
  width: 82px;
  height: 82px;
  background: #11111a;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  position: relative;
}

.craft-slot::before {
  content: attr(data-slot);
  position: absolute;
  top: 4px;
  left: 6px;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--undertale-yellow);
  opacity: 0.8;
}

.craft-slot:hover {
  background: var(--undertale-yellow);
  color: #000000;
}

.craft-slot:hover::before {
  color: #000000;
}

.crafting-result-box {
  width: 90px;
  height: 90px;
  background: #000000;
  border: 4px solid var(--undertale-yellow);
  box-shadow: 5px 5px 0px var(--undertale-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}

.craft-inventory-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.inventory-item-btn {
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 3px 3px 0px var(--undertale-cyan);
  padding: 8px 12px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.inventory-item-btn:hover {
  background: var(--undertale-cyan);
  color: #000000;
}

.crafting-info-panel h3 {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--undertale-yellow);
  margin-bottom: 14px;
}

.crafting-recipes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.recipe-chip {
  background: #000000;
  border: 3px solid #ffffff;
  padding: 10px 16px;
  font-family: var(--font-retro);
  font-size: 22px;
  color: #b8b8cc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recipe-chip b { color: var(--undertale-green); }

/* EPIC BOSS RAIDS SHOWCASE */
.boss-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.boss-container {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: 8px 8px 0px var(--undertale-red);
  padding: 40px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.boss-avatar-stage {
  background: radial-gradient(circle at 50% 50%, rgba(255, 42, 42, 0.25), transparent 75%), #000000;
  border: 4px solid #ffffff;
  box-shadow: 5px 5px 0px var(--undertale-red);
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.boss-icon-lg {
  font-size: 110px;
  filter: drop-shadow(0 0 16px var(--undertale-red));
  animation: boss-pulse 2s ease-in-out infinite;
}

@keyframes boss-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.boss-hp-bar-box {
  width: 85%;
  height: 24px;
  background: #000000;
  border: 3px solid var(--undertale-red);
  margin-top: 20px;
  position: relative;
}

.boss-hp-fill {
  height: 100%;
  width: 85%;
  background: linear-gradient(90deg, var(--undertale-red), var(--undertale-yellow));
}

.boss-hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #000000;
  font-weight: bold;
}

.boss-info-panel h3 {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--undertale-red);
  margin-bottom: 8px;
}

.boss-type-badge {
  display: inline-block;
  background: var(--undertale-red);
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 8px;
  font-weight: bold;
  padding: 4px 10px;
  border: 2px solid #ffffff;
  margin-bottom: 16px;
  box-shadow: 2px 2px 0px #000000;
}

.boss-drops-grid {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.drop-item-chip {
  background: #000000;
  border: 3px solid #ffffff;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--undertale-yellow);
}

/* Characters Showcase Section */
.characters-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
  position: relative;
}

.char-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.char-tab {
  background: #000000;
  border: 3px solid #ffffff;
  box-shadow: 4px 4px 0px var(--undertale-cyan);
  color: #b8b8cc;
  padding: 10px 18px;
  font-family: var(--font-pixel);
  font-size: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-tab:hover {
  color: var(--undertale-yellow);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--undertale-yellow);
}

.char-tab.active {
  background: var(--undertale-yellow);
  color: #000000;
  border-color: #ffffff;
  box-shadow: 5px 5px 0px var(--undertale-red);
  font-weight: bold;
}

.char-display-box {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.char-visual {
  background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.2), transparent 75%), #000000;
  border: 4px solid #ffffff;
  box-shadow: 5px 5px 0px var(--undertale-cyan);
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.char-avatar-img {
  width: 165px;
  height: 165px;
  border: 4px solid #ffffff;
  box-shadow: 5px 5px 0px var(--undertale-yellow);
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
}

.char-role-badge {
  background: var(--undertale-yellow);
  color: #000000;
  font-family: var(--font-pixel);
  font-size: 9px;
  font-weight: bold;
  padding: 6px 14px;
  border: 2px solid #000000;
}

.char-info-panel h3 {
  font-family: var(--font-pixel);
  font-size: 20px;
  color: var(--undertale-yellow);
  margin-bottom: 8px;
}

.char-title-sub {
  font-family: var(--font-retro);
  font-size: 26px;
  color: var(--undertale-green);
  margin-bottom: 18px;
}

.char-bio {
  font-family: var(--font-retro);
  font-size: 22px;
  color: #b8b8cc;
  margin-bottom: 24px;
  line-height: 1.45;
}

/* Stat Bars */
.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-label {
  width: 130px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b8b8cc;
  flex-shrink: 0;
}

.stat-track {
  flex: 1;
  height: 16px;
  background: #000000;
  border: 3px solid #ffffff;
  position: relative;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--undertale-green) 0%, var(--undertale-yellow) 100%);
  width: 0%;
  transition: width 0.8s ease;
}

.stat-value {
  width: 36px;
  font-family: var(--font-retro);
  font-size: 22px;
  color: var(--undertale-yellow);
  text-align: right;
  flex-shrink: 0;
}

.char-skills {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.skill-chip {
  background: #000000;
  border: 3px solid #ffffff;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--undertale-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.skill-chip:hover {
  background: var(--undertale-cyan);
  color: #000000;
}

/* Screenshots / Gallery Section */
.gallery-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gallery-card {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block);
  overflow: hidden;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-caption {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--undertale-yellow);
}

.zoom-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #000000;
  border: 2px solid #ffffff;
  color: var(--undertale-yellow);
  padding: 4px 8px;
  font-family: var(--font-pixel);
  font-size: 8px;
}

/* Story & Lore Section */
.story-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.story-content p {
  font-family: var(--font-retro);
  font-size: 24px;
  color: #b8b8cc;
  margin-bottom: 20px;
  line-height: 1.4;
}

.story-quote {
  border-left: 4px solid var(--undertale-yellow);
  padding-left: 20px;
  font-family: var(--font-retro);
  font-size: 28px;
  color: #ffffff;
  margin: 30px 0;
  font-style: italic;
}

.story-stats-grid {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block-lg);
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.story-stat-box {
  background: #000000;
  border: 3px solid #ffffff;
  padding: 20px;
  text-align: center;
}

.story-stat-box b {
  font-family: var(--font-retro);
  font-size: 44px;
  color: var(--undertale-yellow);
  display: block;
  line-height: 1;
}

.story-stat-box span {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b8b8cc;
  margin-top: 8px;
  display: block;
}

/* Reviews Section */
.reviews-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block);
  padding: 30px;
}

.review-stars {
  color: var(--undertale-yellow);
  font-size: 18px;
  margin-bottom: 14px;
}

.review-text {
  font-family: var(--font-retro);
  font-size: 24px;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 20px;
}

.review-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 3px dashed #ffffff;
  padding-top: 14px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b8b8cc;
}

.review-author b {
  color: var(--undertale-cyan);
}

/* System Specs Section */
.specs-section {
  background: #000000;
  border-bottom: 4px solid #ffffff;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.spec-card {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-block);
  padding: 30px;
}

.spec-card.recommended {
  border-color: #ffffff;
  box-shadow: 6px 6px 0px var(--undertale-yellow);
}

.spec-card h3 {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--undertale-yellow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px dashed #ffffff;
  font-family: var(--font-retro);
  font-size: 22px;
}

.spec-item label {
  color: #b8b8cc;
}

.spec-item span {
  color: #ffffff;
  font-weight: bold;
}

/* Download CTA Section */
.download-section {
  background: #000000;
  text-align: center;
  padding: 120px 0;
}

.download-box {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: 8px 8px 0px var(--undertale-red);
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 30px;
}

.download-box h2 {
  font-family: var(--font-pixel);
  font-size: 26px;
  color: #ffffff;
  margin-bottom: 16px;
  text-shadow: 3px 3px 0px #000000, 6px 6px 0px rgba(255, 42, 42, 0.4);
}

.download-box p {
  font-family: var(--font-retro);
  font-size: 28px;
  color: var(--undertale-green);
  margin-bottom: 36px;
}

.file-info-badge {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b8b8cc;
  margin-top: 24px;
}

/* Modal Popup Windows */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: #0c0c12;
  border: 4px solid #ffffff;
  box-shadow: 8px 8px 0px var(--undertale-yellow);
  max-width: 600px;
  width: 100%;
  padding: 35px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--undertale-red);
  color: #ffffff;
  border: 2px solid #ffffff;
  width: 32px;
  height: 32px;
  font-family: var(--font-pixel);
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--undertale-yellow);
  color: #000000;
}

.modal-title {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--undertale-yellow);
  margin-bottom: 20px;
}

/* Download Progress Modal Content */
.dl-progress-bar-container {
  height: 24px;
  background: #000000;
  border: 3px solid #ffffff;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.dl-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--undertale-red), var(--undertale-yellow));
  transition: width 0.1s linear;
}

.dl-progress-text {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
}

.dl-complete-msg {
  display: none;
  text-align: center;
  margin-top: 20px;
}

.dl-complete-msg.active {
  display: block;
}

/* Lightbox Image Previewer */
.lightbox-img-box {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 4px solid #ffffff;
}

/* Footer */
.footer {
  background: #000000;
  border-top: 4px solid #ffffff;
  padding: 40px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-rights {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: #b8b8cc;
}

/* ==========================================================================
   UNDERTALE & DELTARUNE PLAYABLE ARCADE ENGINE STYLING
   ========================================================================== */
.arcade-section {
  padding: 60px 0;
  background: radial-gradient(circle at center, #121024 0%, #000000 100%);
  border-top: 4px solid var(--undertale-red);
  border-bottom: 4px solid var(--undertale-yellow);
}

.arcade-stage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.arcade-screen-frame {
  position: relative;
  background: #000000;
  border: 6px solid #ffffff;
  box-shadow: 0 0 25px rgba(255, 42, 42, 0.4), inset 0 0 15px rgba(0, 240, 255, 0.2);
  width: 100%;
  max-width: 652px;
  border-radius: 0;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 440;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-color: #000000;
}

.arcade-controls-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 652px;
  background: #0d0e17;
  border: 4px solid #ffffff;
  padding: 16px 24px;
}

/* Touch D-Pad Layout */
.dpad-container {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(3, 40px);
  gap: 4px;
}

.dpad-btn {
  background: #222233;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
}

.dpad-btn:active, .dpad-btn.active {
  background: var(--undertale-yellow);
  color: #000000;
}

.dpad-empty {
  visibility: hidden;
}

/* Action Buttons Z X */
.action-buttons {
  display: flex;
  gap: 16px;
}

.btn-arcade {
  width: 58px;
  height: 58px;
  border: 3px solid #ffffff;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.btn-arcade-z {
  background: var(--undertale-red);
  box-shadow: 0 4px 0 #880000;
}

.btn-arcade-x {
  background: var(--undertale-cyan);
  color: #000000;
  box-shadow: 0 4px 0 #0088aa;
}

.btn-arcade:active {
  transform: translateY(3px);
  box-shadow: none;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 4px;
  background: #11111a;
  border: 2px solid #ffffff;
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-pixel);
  font-size: 10px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--undertale-yellow);
  color: #000000;
  font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .hero-grid,
  .story-grid,
  .char-display-box,
  .crafting-container,
  .boss-container {
    grid-template-columns: 1fr;
  }
  
  .features-grid,
  .gallery-grid,
  .reviews-grid,
  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .features-grid,
  .gallery-grid,
  .reviews-grid,
  .specs-grid,
  .hero-stats-row {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 24px;
  }

  .arcade-controls-panel {
    flex-direction: column;
    gap: 16px;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

