/* ============================================================
   Base Setup
   ============================================================ */
html {
  font-size: 16px;
}

body {
  background-color: #1a1a2e;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  font-family: 'Press Start 2P', cursive;
  overflow: hidden;
}

/* ============================================================
   Arcade Frame
   ============================================================ */
.arcade-frame {
  background: #0d0d1a;
  padding: 2rem;
  border-radius: 2rem;
  border: 0.375rem solid #00f0ff;
  box-shadow: 
    0 0 1.5rem #00f0ff,
    0 0 3rem rgba(0, 240, 255, 0.6),
    inset 0 0 1.25rem rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90vw;
  max-width: 1800px;
  box-sizing: border-box;
}

/* ============================================================
   Title
   ============================================================ */
h1 {
  color: #ffcc00;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 0.625rem rgba(255, 204, 0, 0.7);
  font-size: 2rem;
}

/* ============================================================
   Main Layout
   ============================================================ */
.main-container {
  display: flex;
  align-items: center;
  gap: 2.5vw;
  width: 100%;
}

/* ============================================================
   Center Console
   ============================================================ */
.center-console {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  position: relative;
}

/* ============================================================
   Splash Screen
   ============================================================ */
#splashScreen {
  position: absolute;
  width: 100%;
  height: 100%;
  max-width: 800px;
  max-height: 600px;
  background-color: #000;
  border: 0.25rem solid #33334d;
  box-sizing: border-box;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out;
}

#splashScreen.hidden {
  opacity: 0;
  pointer-events: none;
}

#splashScreen h2 {
  font-size: 4rem;
  color: lime;
  text-shadow: 0 0 1rem lime;
}

/* ============================================================
   Scoreboard & Game Canvas
   ============================================================ */
.score-board,
canvas {
  visibility: hidden;
}

.score-board {
  background-color: #33334d;
  padding: 1rem;
  border-radius: 0.625rem;
  color: #00f0ff;
  text-align: center;
  width: 90%;
  max-width: 800px;
  box-sizing: border-box;
  font-size: 1.6rem;
}

canvas {
  border: 0.25rem solid #33334d;
  box-shadow: inset 0 0 1rem #000;
  background-color: #000;
  max-width: 100%;
  height: auto;
}

/* ============================================================
   Buttons
   ============================================================ */
button {
  background-color: #ff6600;
  color: white;
  border: none;
  font-size: 1.4rem;
  font-family: 'Press Start 2P', cursive;
  cursor: pointer;
  padding: 1rem;
  border-radius: 0.625rem;
  width: 90%;
  max-width: 800px;
  box-sizing: border-box;
  z-index: 20;
}

/* ============================================================
   High Score Panel
   ============================================================ */
.highscore-panel {
  width: 650px;
  height: 600px;
  flex-shrink: 0;
  background-color: #33334d;
  padding: 1.25rem 1.5rem;
  border-radius: 0.625rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.highscore-panel h2 {
  font-size: 1.4rem;
  color: #ffcc00;
  margin-top: 0;
  margin-bottom: 1.25rem;
  text-align: center;
}

.highscore-columns {
  display: flex;
  gap: 1.5rem;
  flex-grow: 1;
  overflow: hidden;
}

.highscore-columns ul {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}

.highscore-columns li {
  font-size: 0.70rem;
  color: #aaffaa;
  padding: 0.18rem 0;
  border-bottom: 1px dashed #555577;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highscore-columns li:last-child {
  border-bottom: none;
}

/* Easter Egg Footer */
.easter-egg-footer-text { text-align: center; color: var(--text-muted, #888); margin-top: 2rem; margin-bottom: 1rem; font-size: 0.85rem; }
#easter-egg-heart { display: inline-block; color: #ff4b4b; cursor: pointer; transition: transform 0.2s ease; user-select: none;  animation: heartbeat 2s infinite; }
@keyframes heartbeat { 0% { transform: scale(1); } 14% { transform: scale(1.3); } 28% { transform: scale(1); } 42% { transform: scale(1.3); } 70% { transform: scale(1); } }
.easter-egg-spin { animation: spin-heart 2s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
@keyframes spin-heart { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Arcade Outgoing Back Link */
.arcade-footer {
  text-align: center;
  margin-top: 15px;
}

.arcade-back-link {
  color: #00f0ff;
  text-decoration: none;
  font-size: 0.75rem;
  transition: opacity 0.2s ease;
}

.arcade-back-link:hover {
  opacity: 0.8;
}


/* ============================================================
   Compact Desktop & Windows 125%-150% Scaling (1280x600 - 1536x750)
   ============================================================ */
@media (max-width: 1600px), (max-height: 860px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 0;
    box-sizing: border-box;
  }

  .arcade-frame {
    padding: 0.9rem 1.25rem;
    border-radius: 1.25rem;
    width: 95vw;
  }

  h1 {
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
  }

  .main-container {
    gap: 1.5vw;
  }

  .center-console {
    gap: 0.6rem;
    min-width: 0;
  }

  .score-board {
    padding: 0.5rem 0.75rem;
    font-size: 1.05rem;
  }

  canvas {
    max-height: calc(100vh - 210px);
    width: auto;
  }

  #splashScreen {
    max-height: calc(100vh - 210px);
  }

  #splashScreen h2 {
    font-size: 2.4rem;
  }

  button {
    font-size: 1rem;
    padding: 0.6rem;
  }

  .highscore-panel {
    width: clamp(300px, 38vw, 560px);
    height: auto;
    max-height: calc(100vh - 150px);
    padding: 0.85rem 1rem;
  }

  .highscore-panel h2 {
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
  }

  .highscore-columns {
    gap: 0.85rem;
    overflow-y: auto;
  }

  .highscore-columns li {
    font-size: 0.6rem;
    padding: 0.12rem 0;
  }

  .easter-egg-footer-text {
    margin-top: 0.6rem;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
  }

  .arcade-footer {
    margin-top: 6px;
  }
}

@media (max-width: 1024px) {
  .main-container {
    flex-direction: column;
  }

  .highscore-panel {
    width: 100%;
    max-height: 320px;
  }
}
