/* Chimaek Squadron — 8-bit pojangmacha arcade cabinet */

:root {
  --bg-deep: #06080d;
  --bg: #0d1018;
  --bezel: #1a1006;
  --bezel-light: #2a1a08;
  --ink: #fff8dc;
  --muted: #c4a878;
  --arcade-orange: #ff8800;
  --arcade-green: #00ff66;
  --arcade-red: #ff3344;
  --arcade-yellow: #ffe500;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: "Press Start 2P", "DotGothic16", monospace;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: grid;
  place-items: center;
  padding: 18px;
}

/* CRT 효과 */
.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.32) 3px,
    rgba(0, 0, 0, 0.32) 4px
  );
}

.arcade {
  position: relative;
  z-index: 1;
  width: min(1020px, 100%);
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, var(--bezel-light), var(--bezel));
  border: 3px solid var(--arcade-orange);
  box-shadow:
    inset 0 0 0 4px #0a0500,
    0 0 0 6px #2a1a08,
    0 20px 60px rgba(255, 136, 0, 0.25);
}

/* TOP BEZEL */
.bezel-top {
  padding: 10px 6px 14px;
  text-align: center;
  border-bottom: 2px dashed rgba(255, 136, 0, 0.5);
  margin-bottom: 12px;
}

.bezel-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--arcade-yellow);
  background: rgba(255, 229, 0, 0.06);
  border: 1px solid rgba(255, 229, 0, 0.35);
}

.bezel-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

.bezel-row-sub {
  grid-template-columns: 1fr 1fr;
  max-width: 70%;
  margin: 0 auto;
}

.bezel-cell {
  padding: 6px 8px;
  background: #000;
  border: 1px solid rgba(255, 136, 0, 0.25);
  text-align: center;
}

.bezel-cell span {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--arcade-orange);
  margin-bottom: 4px;
}

.bezel-cell strong {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.bezel-cell-mid strong { color: var(--arcade-yellow); }

/* SCREEN */
.screen-wrap {
  position: relative;
  background: #000;
  border: 4px solid #000;
  outline: 2px solid rgba(255, 136, 0, 0.45);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.88);
}

.hidden { display: none; }

.title-screen {
  text-align: center;
  width: min(440px, 100%);
}

.title-eyebrow {
  margin: 0 0 14px;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--arcade-green);
  animation: blink 1.4s steps(2) infinite;
}

.title-eyebrow.danger { color: var(--arcade-red); }

.title-art {
  margin: 0 0 18px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1.4rem, 4.6vw, 2.6rem);
  line-height: 1.2;
  color: var(--arcade-orange);
  text-shadow:
    3px 3px 0 #000,
    6px 6px 0 var(--arcade-red);
}

.title-art.danger {
  color: var(--arcade-red);
  text-shadow:
    3px 3px 0 #000,
    6px 6px 0 var(--arcade-yellow);
}

.title-body {
  margin: 0 0 22px;
  font-family: "DotGothic16", "Press Start 2P", monospace;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}

.cab-button {
  min-width: 220px;
  padding: 14px 18px;
  border: 3px solid var(--arcade-yellow);
  background: #000;
  color: var(--arcade-yellow);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  cursor: pointer;
  animation: cab-pulse 1.6s ease-in-out infinite;
  transition: transform 80ms ease;
}

.cab-button:hover { transform: translateY(-2px); }

@keyframes cab-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 229, 0, 0.7); }
  50%      { box-shadow: 0 0 0 10px rgba(255, 229, 0, 0); }
}

/* BOTTOM BEZEL */
.bezel-bottom {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed rgba(255, 136, 0, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 0.18em;
}

.insert { color: var(--arcade-green); }
.copy { color: var(--muted); opacity: 0.7; }

.blink { animation: blink 1.2s steps(2) infinite; }

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 640px) {
  body { padding: 8px; }
  .arcade { padding: 10px; }
  .bezel-tag { font-size: 8px; }
  .bezel-cell strong { font-size: 11px; }
  .bezel-cell span { font-size: 7px; }
  .bezel-bottom { font-size: 7px; flex-direction: column; gap: 6px; }
  .bezel-row-sub { max-width: 100%; }
}
