/* =========================================================
   GLOBAL FONTS & COLORS
========================================================= */
:root {
  --shell-gray: #d0d3da;
  --shell-dark: #9a9ea8;
  --shell-line: #888c96;

  --screen-bg-top: #1d3d5a;
  --screen-bg-mid: #060b16;
  --screen-bg-bottom: #04030a;

  --panel-bg: #1a1a25;
  --panel-border: #3a3a52;
  --panel-inner: #141420;

  --blue: #63d3ff;
  --yellow: #ffcf4b;
  --green: #7fff7a;
  --red: #ff6b6b;

  --text-main: #e7eefd;

  font-family: "Press Start 2P", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #171b2e 0%, #05050a 55%, #020308 100%);
  min-height: 100vh;
  color: var(--text-main);
}

/* =========================================================
   BOOT SCREEN
========================================================= */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  transition: opacity 0.6s ease;
}

.boot-text {
  font-size: 14px;
  color: var(--blue);
  text-align: center;
  animation: bootBlink 0.6s steps(2, start) infinite;
}

@keyframes bootBlink {
  50% { opacity: 0; }
}

/* =========================================================
   CONSOLE SHELL
========================================================= */
.console-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* reduced from 16px so desktop isn't spaced too far */
}

.console-shell {
  width: clamp(380px, 92vw, 1400px); /* ideal scaling for both desktop + mobile */
  background: linear-gradient(180deg, var(--shell-gray), #c1c5ce);
  border-radius: 28px;
  padding: 20px; /* balanced for both large and small screens */
  border: 5px solid var(--shell-line);

  /* deeper + more realistic console shading */
  box-shadow:
    0 22px 55px rgba(0,0,0,0.85),
    0 0 0 4px #f8f9fb inset;
}

/* Top bezel */
.console-top {
  display: grid;
  grid-template-columns: 20px 1fr 20px;
  align-items: center;
  margin-bottom: 10px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #555a63;
  background: #22252c;
}

.console-label {
  text-align: center;
  font-size: 10px;
  color: #33353f;
}

/* =========================================================
   SCREEN
========================================================= */
.console-screen {
  position: relative;

  /* Dynamic scaling instead of fixed padding */
  padding: clamp(12px, 2vw, 22px);

  /* Better CRT gradient — deeper shadows, stronger top light */
  background: radial-gradient(
      circle at 50% 0%,
      var(--screen-bg-top) 0%,
      var(--screen-bg-mid) 38%,
      var(--screen-bg-bottom) 100%
  );

  border-radius: 20px;
  border: 4px solid #2c3038;

  /* Stronger authentic CRT glow */
  box-shadow:
    0 0 70px rgba(0, 200, 255, 0.22) inset,
    0 0 30px rgba(0, 200, 255, 0.18),
    0 0 12px rgba(0, 0, 0, 0.9) inset;

  overflow: hidden;

  /* Prevent CRT tilt from breaking layout */
  transform-origin: center;
  will-change: transform;
}

.crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crt-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(255,255,255,0.04) 3px
  );
  mix-blend-mode: soft-light;
  opacity: 0.6;
  z-index: 1;
}

.crt-glow {
  box-shadow:
    0 0 140px rgba(0,150,255,0.4) inset,
    0 0 260px rgba(0,180,255,0.6) inset;
  z-index: 1;
}

.crt-distortion {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(0,0,0,0.03) 1px
  );
  mix-blend-mode: overlay;
  opacity: 0.3;
  z-index: 2;
}

/* Sweep line */
.crt-sweep {
  top: -100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,0.06) 50%,
    transparent
  );
  opacity: 0;
  z-index: 3;
}

.crt-sweep.run {
  animation: sweepAnim 1.4s linear;
}

@keyframes sweepAnim {
  0% { top: -100%; opacity: 0; }
  20% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Screen contents */
.screen-inner {
  position: relative;
  z-index: 5;
}

/* Hover intensifies scanlines slightly */
.console-screen:hover .crt-scanlines {
  opacity: 0.9;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
.site-header {
  margin-bottom: 16px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.pixel-title {
  font-size: 22px;
  margin: 0 0 6px;
}

.tagline {
  font-size: 10px;
  margin: 0;
}

.panel-title {
  font-size: 13px;
  margin: 0 0 10px;
}

.section-label::before {
  content: "▶ ";
  color: var(--blue);
}

.body-text {
  font-size: 10px;
  line-height: 1.7;
  margin: 0 0 8px;
}

.pixel-list {
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
  padding-left: 18px;
}

.pixel-meta {
  margin-top: 8px;
  font-size: 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pixel-footer {
  font-size: 9px;
  margin: 4px 0;
}

.pixel-footer.small {
  font-size: 8px;
}

.license-link {
  color: var(--blue);
  text-decoration: underline;
}

/* Shimmer effect for title */
.shimmer {
  background: linear-gradient(90deg, #fff, #9afff0, #fff);
  background-size: 200%;
  -webkit-background-clip: text;
  color: transparent;
  animation: shimmerAnim 3s linear infinite;
}

@keyframes shimmerAnim {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================================
   PANELS
========================================================= */
.panel {
  background: var(--panel-inner);
  border-radius: 14px;
  padding: 14px 16px;
  border: 3px solid var(--panel-border);
  box-shadow: 0 0 0 3px #05050c inset;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.panel.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 16px;
}

/* Hero left */
.hero-bullets {
  margin: 4px 0 8px;
}

/* Hero right */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.screen-frame {
  background: #000;
  border-radius: 10px;
  padding: 6px;
  box-shadow:
    0 0 0 2px #3a3d46 inset,
    0 0 20px rgba(0,0,0,0.9);
}

.hero-gif {
  display: block;
  width: 100%;
  border-radius: 6px;
  image-rendering: pixelated;
}

/* Buttons */
.pixel-btn {
  display: inline-block;
  padding: 9px 18px;
  background: var(--blue);
  color: #04233b;
  border-radius: 6px;
  border: 3px solid #284c63;
  box-shadow:
    0 3px #163044,
    0 0 0 3px #09101b inset,
    0 0 10px rgba(99,211,255,0.6);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.pixel-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 4px #163044,
    0 0 0 3px #09101b inset,
    0 0 16px rgba(99,211,255,0.8);
}

.pixel-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px #163044,
    0 0 0 3px #09101b inset;
}

.primary-download {
  margin-top: 10px;
  animation: pulseGlow 2.4s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 3px #163044, 0 0 0 3px #09101b inset, 0 0 10px rgba(99,211,255,0.5); }
  50% { box-shadow: 0 3px #163044, 0 0 0 3px #09101b inset, 0 0 20px rgba(99,211,255,1); }
}

/* Game grid cards */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.game-card {
  margin: 0;
  text-align: center;
  font-size: 9px;
  background: #10121c;
  border-radius: 8px;
  padding: 6px 6px 8px;
  border: 2px solid #323547;
  box-shadow: 0 0 0 2px #05050c inset;
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.game-card img {
  width: 100%;
  image-rendering: pixelated;
  border-radius: 4px;
  margin-bottom: 4px;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 12px rgba(99,211,255,0.7);
  filter: brightness(1.04);
}

/* =========================================================
   SOUND FX PANEL
========================================================= */
.sfx-panel {
  text-align: center;
}

.sfx-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.sfx-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  padding: 8px 14px;
  background: #e9ecf2;
  border-radius: 8px;
  border: 3px solid #50545f;
  color: #22252c;
  box-shadow: 0 3px #9a9ea8, 0 0 0 3px #d8dbe2 inset;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease, box-shadow 0.12s ease;
}

.sfx-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.sfx-btn:active {
  transform: translateY(1px);
}

/* Bottom CTA */
.bottom-cta {
  text-align: center;
}

/* Footer */
.site-footer {
  margin-top: 16px;
  text-align: center;
}

/* =========================================================
   CONSOLE CONTROLS (BOTTOM)
========================================================= */
.console-controls {
  margin-top: 14px;
  background: linear-gradient(180deg, #cfd2da, #b7bbc5);
  border-radius: 18px;
  padding: 8px 10px 10px;
  border: 3px solid var(--shell-line);
  box-shadow: 0 3px #9a9ea8 inset;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.buttons-row {
  margin-bottom: 6px;
}

/* Sound button */
.sound-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 2px solid #555a63;
  background: #e9ecf2;
  color: #33353f;
  box-shadow: 0 3px #9a9ea8;
  cursor: pointer;
}

.sound-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px #9a9ea8;
}

/* LEDs */
.status-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #444853;
  background: #262a33;
  box-shadow: 0 0 4px rgba(0,0,0,0.6) inset;
}

.led-blue.active { background: #4ccaff; box-shadow: 0 0 6px rgba(76,202,255,0.9); }
.led-green.active { background: #7fff7a; box-shadow: 0 0 6px rgba(127,255,122,0.9); }
.led-red.active { background: #ff6b6b; box-shadow: 0 0 6px rgba(255,107,107,0.9); }

/* Sliders / ports */
.sliders-row {
  margin-top: 4px;
  gap: 10px;
}

.slider-slot {
  flex: 1;
  height: 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #dfe3ea, #b4b8c3);
  border: 2px solid #8e92a0;
  box-shadow: 0 2px #a1a5b0 inset;
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(4, 6px);
  grid-template-rows: repeat(2, 6px);
  gap: 3px;
  margin: 0 10px;
}

.port-grid div {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #4f535f;
}

/* Jacks */
.jack-row {
  display: flex;
  gap: 6px;
}

.jack {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #555a63;
  background: #22252c;
}

.jack-cyan { background: #63d3ff; }
.jack-yellow { background: #ffcf4b; }
jack-green { background: #7fff7a; }
.jack-red { background: #ff6b6b; }

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-right {
    order: -1;
  }

  .console-shell {
    padding: 12px 10px 14px;
  }

  .console-screen {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .pixel-title {
    font-size: 18px;
  }

  .tagline {
    font-size: 9px;
  }

  .panel-title {
    font-size: 11px;
  }

  .body-text,
  .pixel-list {
    font-size: 9px;
  }

  .pixel-btn {
    font-size: 9px;
  }

  .sound-btn {
    font-size: 7px;
  }
}



