/* ============================================================
   RETRO.CSS — The Worst Website on the Internet™
   Best viewed in Netscape Navigator 4.0 at 800x600
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --neon-green: #66cc66;
  --hot-pink: #cc7799;
  --electric-blue: #5588aa;
  --electric-yellow: #FFE44D;
  --windows-gray: #C0C0C0;
  --windows-dark: #808080;
  --windows-blue: #000080;
  --link-blue: #0000EE;
  --link-visited: #551A8B;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Comic Sans MS', 'Comic Sans', sans-serif;
  background-color: var(--windows-blue);
  color: white;
  margin: 0;
  padding: 0;
  cursor: default;
}

/* ---- BLINK ANIMATION (RIP <blink> tag) ---- */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.blink {
  animation: blink 1s step-end infinite;
}
.blink-fast {
  animation: blink 0.5s step-end infinite;
}

/* ---- RAINBOW HR ---- */
hr {
  border: none;
  height: 4px;
  background: linear-gradient(
    to right,
    red, orange, yellow, green, cyan, blue, violet
  );
  margin: 8px 0;
}

/* ---- LINKS ---- */
a {
  color: var(--link-blue);
  text-decoration: underline;
}
a:visited {
  color: var(--link-visited);
}
a:hover {
  color: red;
  text-decoration: underline;
}

/* ---- RETRO BUTTON ---- */
.button-retro {
  font-family: 'Comic Sans MS', 'Comic Sans', sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: black;
  background: var(--windows-gray);
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  padding: 6px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  user-select: none;
}
.button-retro:active {
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  padding: 7px 15px 5px 17px;
}
.button-retro:hover {
  background: #d0d0d0;
}

/* ---- WINDOWS 95 PANEL ---- */
.panel-raised {
  background: var(--windows-gray);
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  color: black;
}

.panel-sunken {
  background: var(--windows-gray);
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  color: black;
}

.title-bar {
  background: linear-gradient(to right, var(--windows-blue), #1084d0);
  color: white;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Arial', sans-serif;
  letter-spacing: 0.5px;
  user-select: none;
}

.title-bar-buttons {
  display: flex;
  gap: 2px;
}

.title-bar-btn {
  width: 16px;
  height: 14px;
  background: var(--windows-gray);
  border-top: 1px solid white;
  border-left: 1px solid white;
  border-right: 1px solid #555;
  border-bottom: 1px solid #555;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  color: black;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

/* ---- SCROLLBARS ---- */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
::-webkit-scrollbar-track {
  background: var(--windows-gray);
}
::-webkit-scrollbar-thumb {
  background: var(--windows-gray);
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
}
::-webkit-scrollbar-button {
  background: var(--windows-gray);
  border-top: 2px solid white;
  border-left: 2px solid white;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  display: block;
  height: 16px;
  width: 16px;
}

/* ---- SELECTION COLOR ---- */
::selection {
  background: var(--windows-blue);
  color: white;
}

/* ---- STAR RATING ---- */
.stars {
  color: var(--electric-yellow);
  font-size: 16px;
  letter-spacing: 2px;
}

/* ---- MARQUEE-STYLE (fallback) ---- */
.marquee-custom {
  overflow: hidden;
  white-space: nowrap;
}
.marquee-custom span {
  display: inline-block;
  animation: marquee-scroll 20s linear infinite;
}
@keyframes marquee-scroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* ---- CURSOR TRAIL PARTICLES ---- */
.cursor-particle {
  position: fixed;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  z-index: 99999;
  animation: particle-fade 0.8s ease-out forwards;
}
@keyframes particle-fade {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0) translateY(-20px); }
}

/* ---- SHAKE ANIMATION (for wrong answers) ---- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}
.shake {
  animation: shake 0.5s ease-in-out;
}

/* ---- FLASH RED ---- */
@keyframes flash-red {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(255, 0, 0, 0.4); }
}
.flash-red {
  animation: flash-red 0.3s ease-in-out 3;
}

/* ---- GLOW TEXT ---- */
.neon-green {
  color: var(--neon-green);
  text-shadow: 0 0 4px rgba(102, 204, 102, 0.5);
}
.neon-pink {
  color: var(--hot-pink);
  text-shadow: 0 0 4px rgba(204, 119, 153, 0.5);
}
.neon-blue {
  color: var(--electric-blue);
  text-shadow: 0 0 4px rgba(85, 136, 170, 0.5);
}
.neon-yellow {
  color: var(--electric-yellow);
  text-shadow: 0 0 4px rgba(255, 228, 77, 0.4);
}

/* ---- IMPACT HEADER ---- */
.impact-header {
  font-family: Impact, 'Arial Black', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ---- VISITOR COUNTER ---- */
.visitor-counter {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: black;
  color: var(--neon-green);
  border: 2px inset #555;
  padding: 4px 10px;
  display: inline-block;
  letter-spacing: 2px;
}

/* ---- NEW BADGE ---- */
.new-badge {
  background: red;
  color: yellow;
  font-size: 10px;
  font-weight: bold;
  font-family: Impact, sans-serif;
  padding: 2px 6px;
  border-radius: 3px;
  animation: blink 1s step-end infinite;
  display: inline-block;
  vertical-align: middle;
}

/* ---- GAME CANVAS CONTAINER ---- */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: black;
  padding: 20px;
}

.game-canvas {
  border: 4px solid var(--windows-gray);
  border-top-color: #555;
  border-left-color: #555;
  border-right-color: white;
  border-bottom-color: white;
  image-rendering: pixelated;
}

/* ---- BACK LINK ---- */
.back-link {
  display: inline-block;
  margin: 10px;
  font-family: 'Comic Sans MS', 'Comic Sans', sans-serif;
  font-size: 14px;
}
