:root {
  --primary-blue: #658fff;
  --secondary-blue: #2a78c3bb;
  --accent-yellow: #ffd75c;
  --bg-start: #22294b;
  --bg-mid: #121629;
  --overlay-bg: rgba(20, 25, 40, 0.9);
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* hide game & panels in menu/slides/countdown */
body.gamemenu #gamesidebar,
body.gamemenu #gamedescription,
body.gamemenu #gameviewport canvas {
  display: none;
}

#gamecontainer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 95%;
  max-width: 1600px;
  height: 600px;
  margin: 0 auto;
}

#gamesidebar,
#gamedescription {
  background: rgba(33, 35, 64, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 8px 34px rgba(17, 21, 34, 0.14);
  color: #e8eefa;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 12px;
}

#gamesidebar {
  width: 280px;
  min-width: 280px;
  padding: 20px;
  overflow: hidden;
}

#gamedescription {
  width: 280px;
  min-width: 280px;
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow: hidden;
}

#gamesidebar h3,
#gamedescription h3 {
  font-weight: 900;
  color: var(--primary-blue);
  border-bottom: 2px solid #5b7fe6;
  padding-bottom: 6px;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

#gamesidebar p,
#gamedescription li {
  font-size: 0.95rem;
  color: #ffe6a0;
  font-weight: 500;
  margin-bottom: 8px;
}

#gamedescription ul {
  padding-left: 1.2em;
  margin-bottom: 12px;
  list-style: disc;
}

#gameviewport {
  position: relative;
  width: 800px;
  height: 600px;
  background: #15182a;
  border-radius: 20px;
  border: 2px solid var(--primary-blue);
  box-shadow: 0 0 30px var(--secondary-blue);
  overflow: hidden;
  flex-shrink: 0;
}

#gameviewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff9c6;
  text-align: center;
  visibility: hidden;
  pointer-events: none;
  border-radius: 20px;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay.visible {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.overlay h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.overlay p {
  margin: 6px 0;
  font-size: 1.2rem;
}

.overlay input,
.overlay button {
  margin-top: 10px;
  padding: 8px;
  font-size: 1rem;
}

.overlay button {
  background: var(--accent-yellow);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.overlay button:hover {
  transform: scale(1.1);
  background: #fff9c6;
  color: #263548;
}

/* language selector */
.lang-select {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
}

.lang-select label {
  color: #fff9c6;
  margin-right: 6px;
}

.lang-select select {
  padding: 6px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
}

#homeOverlay {
  background: #15182a;
}

@keyframes flash {
  0%,
  100% {
    background-color: rgba(255, 0, 0, 0);
  }
  50% {
    background-color: rgba(255, 0, 0, 0.4);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-5px, 0);
  }
  75% {
    transform: translate(5px, 0);
  }
}

#gameviewport.flash::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: flash 0.3s ease-out;
  pointer-events: none;
}

#gameviewport.shake {
  animation: shake 0.3s ease-out;
}

@keyframes enzymePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.enzyme-pulse {
  animation: enzymePulse 0.3s ease-in-out;
}

@media (max-width: 1200px) {
  #gamecontainer {
    flex-direction: column;
    height: auto;
  }

  #gamesidebar,
  #gamedescription {
    width: 100%;
    max-width: 800px;
    margin: 6px auto;
  }

  #gameviewport {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 4/3;
    height: auto;
  }
}

/* ========================================
   GAME PAGE OVERRIDES - Add to game1.css
 ======================================== */

/* Force black background on entire page */
body {
  background: #000000 !important;
  background-image: none !important;
}

/* Wrapper for game page content */
.game-page-wrapper {
  background-color: #000000 !important;
  min-height: 100vh;
  padding: 20px 0;
  margin: 0;
}

/* Reset cursor for game page */
.game-page-wrapper * {
  cursor: default !important;
}

/* Back button container */
.back-button-container {
  max-width: 1400px;
  margin: 0 auto 30px;
  padding: 0 20px;
}

/* Back button styling */
.arcade-back-btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--accent-yellow)
  );
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  border: 2px solid var(--primary-blue);
  box-shadow: 0 0 20px var(--secondary-blue);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arcade-back-btn:hover {
  background: linear-gradient(
    135deg,
    var(--accent-yellow),
    var(--primary-blue)
  );
  box-shadow: 0 0 30px var(--accent-yellow);
  transform: translateY(-2px);
  color: #000;
  text-decoration: none;
}

/* Game description section */
.game-description-section {
  max-width: 1200px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.arcade-panel {
  background: linear-gradient(
    135deg,
    rgba(34, 41, 75, 0.95),
    rgba(18, 22, 41, 0.95)
  );
  border: 3px solid var(--primary-blue);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 0 30px var(--secondary-blue), inset 0 0 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.arcade-panel::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(101, 143, 255, 0.03) 2px,
    rgba(101, 143, 255, 0.03) 4px
  );
  animation: scan 8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(50px);
  }
}

.arcade-title {
  font-family: "Orbitron", "Rubik", sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--accent-yellow);
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 0 0 10px var(--accent-yellow), 0 0 20px var(--accent-yellow);
  line-height: 1.4;
}

.arcade-subtitle {
  font-family: "Orbitron", "Rubik", sans-serif;
  font-size: 22px;
  color: var(--primary-blue);
  margin-top: 30px;
  margin-bottom: 15px;
  text-shadow: 0 0 10px var(--primary-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arcade-text {
  font-size: 16px;
  line-height: 1.8;
  color: #e8eefa;
  margin-bottom: 20px;
}

.arcade-text strong {
  color: var(--accent-yellow);
  font-weight: 700;
}

.arcade-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 25px;
}

.arcade-list li {
  font-size: 15px;
  line-height: 1.7;
  color: #e8eefa;
  margin-bottom: 12px;
  padding-left: 30px;
  position: relative;
}

.arcade-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--accent-yellow);
  font-size: 14px;
}

.arcade-list li strong {
  color: var(--accent-yellow);
  font-weight: 700;
}

/* Neon title for "Play the Game" */
.neon-text-small {
  font-family: "Orbitron", "Rubik", sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-yellow);
  text-align: center;
  margin: 40px 0 30px;
  text-shadow: 0 0 10px var(--accent-yellow), 0 0 20px var(--accent-yellow),
    0 0 30px var(--primary-blue);
}

/* Center the game container */
.oscargame {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .arcade-panel {
    padding: 25px 20px;
  }

  .arcade-title {
    font-size: 24px;
  }

  .arcade-subtitle {
    font-size: 18px;
  }

  .arcade-text,
  .arcade-list li {
    font-size: 14px;
  }

  .neon-text-small {
    font-size: 20px;
  }
}

code {
  background-color: #0d1117;
  color: #00ff00;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  font-weight: bold;
}

pre {
  background-color: #0d1117;
  color: #00ff00;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  border: 1px solid #30363d;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: #00ff00;
}
