/* === ARCADE SCREEN === */
/* Classic arcade CRT aesthetic */

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

:root {
  --crt-green: #33ff33;
  --crt-amber: #ffb000;
  --crt-blue: #00aaff;
  --crt-red: #ff3333;
  --crt-white: #ffffff;
  --cabinet-black: #1a1a1a;
  --bezel-color: #2d2d2d;
  --screen-dark: #0a0a0a;
}

body {
  font-family: 'Courier New', monospace;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  overflow-x: hidden;
}

/* === CABINET === */
.cabinet {
  width: min(600px, 95vw);
  background: var(--cabinet-black);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.05);
}

/* === SCREEN BEZEL === */
.screen-bezel {
  background: var(--bezel-color);
  border-radius: 15px;
  padding: 1rem;
  box-shadow:
    inset 0 5px 20px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(255, 255, 255, 0.1);
}

/* === CRT SCREEN === */
.crt-screen {
  background: var(--screen-dark);
  border-radius: 10px 10px 20px 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 100px rgba(51, 255, 51, 0.1),
    inset 0 0 50px rgba(0, 0, 0, 0.8);
}

/* === SCANLINES === */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2) 0px,
    rgba(0, 0, 0, 0.2) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 10;
}

/* === SCREEN CONTENT === */
.screen-content {
  padding: 1.5rem;
  position: relative;
  z-index: 5;
  text-shadow: 0 0 10px currentColor;
}

/* === GAME HEADER === */
.game-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  font-size: clamp(0.6rem, 2vw, 0.8rem);
}

.score-panel,
.high-score {
  text-align: center;
}

.label {
  display: block;
  color: var(--crt-red);
  letter-spacing: 0.1em;
}

.score {
  display: block;
  color: var(--crt-white);
  font-size: 1.2em;
  margin-top: 0.25rem;
}

.high-score .label {
  color: var(--crt-amber);
}

.high-score .score {
  color: var(--crt-amber);
}

/* === GAME MAIN === */
.game-main {
  text-align: center;
  padding: 2rem 0;
}

.game-title {
  margin-bottom: 2rem;
}

.title-line {
  display: block;
  font-size: clamp(2rem, 10vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--crt-blue);
  text-shadow:
    0 0 10px var(--crt-blue),
    0 0 20px var(--crt-blue),
    0 0 40px var(--crt-blue);
}

.title-line.accent {
  color: var(--crt-amber);
  text-shadow:
    0 0 10px var(--crt-amber),
    0 0 20px var(--crt-amber),
    0 0 40px var(--crt-amber);
}

.insert-coin {
  margin: 2rem 0;
}

.blink {
  font-size: clamp(1rem, 4vw, 1.5rem);
  color: var(--crt-green);
  letter-spacing: 0.2em;
  animation: blink 1s step-end infinite;
}

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

.credits {
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  color: var(--crt-white);
  letter-spacing: 0.2em;
}

/* === STORIES === */
.stories {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.story-card {
  background: rgba(51, 255, 51, 0.05);
  border: 1px solid rgba(51, 255, 51, 0.2);
  padding: 1rem;
  text-align: left;
}

.story-card h2 {
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  color: var(--crt-green);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.story-card p {
  font-size: clamp(0.65rem, 2vw, 0.8rem);
  color: rgba(51, 255, 51, 0.7);
  line-height: 1.7;
  font-family: Georgia, serif;
}

/* === GAME FOOTER === */
.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 255, 51, 0.2);
}

.lives {
  display: flex;
  gap: 0.5rem;
}

.life {
  width: 16px;
  height: 16px;
  background: var(--crt-red);
  clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 50% 75%, 20% 100%, 0% 35%);
  box-shadow: 0 0 10px var(--crt-red);
}

.copyright {
  font-size: clamp(0.5rem, 1.5vw, 0.65rem);
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
}

/* === SCREEN EFFECTS === */
.screen-curve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 70%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
  z-index: 15;
  border-radius: 10px 10px 20px 20px;
}

.screen-glare {
  position: absolute;
  top: 5%;
  left: 10%;
  width: 30%;
  height: 20%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 20;
  border-radius: 50%;
}

/* === CONTROLS === */
.controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1.5rem;
  margin-top: 1rem;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 10px;
}

.joystick {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 30% 30%, #4a4a4a, #2a2a2a);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow:
    inset 0 -5px 15px rgba(0, 0, 0, 0.5),
    0 5px 15px rgba(0, 0, 0, 0.3);
}

.stick {
  width: 20px;
  height: 40px;
  background: linear-gradient(90deg, #1a1a1a 0%, #3a3a3a 50%, #1a1a1a 100%);
  border-radius: 10px 10px 5px 5px;
  position: relative;
}

.stick::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 30% 30%, #ff4444, #aa0000);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.buttons {
  display: flex;
  gap: 1rem;
}

.button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow:
    inset 0 -5px 15px rgba(0, 0, 0, 0.5),
    0 5px 15px rgba(0, 0, 0, 0.3);
}

.button-a {
  background: radial-gradient(circle at 30% 30%, #ff6666, #cc0000);
}

.button-b {
  background: radial-gradient(circle at 30% 30%, #6666ff, #0000cc);
}

/* === RESPONSIVE === */
@media (min-width: 500px) {
  .stories {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 600px) {
  .cabinet {
    padding: 2rem;
  }

  .screen-bezel {
    padding: 1.5rem;
  }

  .screen-content {
    padding: 2rem;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .blink {
    animation: none;
    opacity: 1;
  }
}

/* === CRT FLICKER EFFECT (subtle) === */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.9; }
  94% { opacity: 1; }
}

.crt-screen {
  animation: flicker 5s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .crt-screen {
    animation: none;
  }
}
