* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at top, var(--bg-top, #1b0033), var(--bg-mid, #02010a) 60%, var(--bg-bottom, #000000));
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-x: hidden;
}

/* POWERUP DISPLAY */

#powerup-display {

  width: 70px;

  display: flex;
  flex-direction: column;

  gap: 14px;

  margin-top: 60px;
}

/* EACH ACTIVE POWERUP */

.powerup-status {

  width: 70px;
  height: 70px;

  border-radius: 18px;

  background:
    rgba(0,0,0,0.45);

  border:
    1px solid rgba(255,255,255,0.12);

  display: none;

  flex-direction: column;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 0 20px rgba(0,255,255,0.15);

  position: relative;
}

/* ICON */

.powerup-big-icon {

  font-size: 30px;

  text-shadow:
    0 0 12px white;
}

/* TIMER */

.powerup-timer {

  margin-top: 4px;

  font-size: 12px;

  color: #ffffff;

  text-shadow:
    0 0 8px #00ffff;
}

/* SPECIFIC POWERUPS */

#shield-status {

  border-color: #00ffff;

  box-shadow:
    0 0 20px #00ffff55;
}

#slow-status {

  border-color: #ffff00;

  box-shadow:
    0 0 20px #ffff0055;
}

#multiplier-status {

  border-color: #ff00ff;

  box-shadow:
    0 0 20px #ff00ff55;
}

/* MAIN LAYOUT */

#main-area {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  margin-top: 20px;
  transform: translateX(-6px);
}

/* LEFT SIDE */

#left-column {
  display: flex;
  flex-direction: column;
  width: min(95vw, 800px);
}

/* SIDEBAR */

#sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
  min-width: 300px;
}

#sidebar > div {
  width: 100%;
}

#control-buttons {
  width: auto;
}

#control-buttons button {
  width: auto;
  flex: 0 0 auto;
}

/* ACTIVE EFFECTS BAR */

#active-effects {

  width: 800px;
  height: 70px;
  overflow: hidden;

  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 8px;
  margin-bottom: 10px;

  padding: 10px 7px;

  border-radius: 18px;

  background:
    rgba(255,255,255,0.04);

  border:
    1px solid rgba(0,255,255,0.12);

  box-shadow:
    0 0 20px rgba(0,255,255,0.08);
}

/* EACH EFFECT */

.effect-indicator {

  display: none;

  align-items: center;
  gap: 8px;

  min-width: 150px;
  height: 48px;
  padding: 6px 10px;

  border-radius: 14px;

  background:
    rgba(0,0,0,0.4);

  border:
    1px solid rgba(255,255,255,0.1);
}

/* ACTIVE */

.effect-indicator.active {
  display: flex;
}

/* SHIELD */

#shield-indicator {

  border-color:
    rgba(0,255,255,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(0,255,255,0.14),
      rgba(0,68,255,0.12)
    );

  box-shadow:
    0 0 14px rgba(0,255,255,0.18);
}

/* SLOW */

#slow-indicator {

  border-color:
    rgba(255,220,0,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(255,255,0,0.14),
      rgba(255,136,0,0.12)
    );

  box-shadow:
    0 0 14px rgba(255,200,0,0.16);
}

/* MULTIPLIER */

#multiplier-indicator {

  border-color:
    rgba(255,0,255,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(255,0,255,0.14),
      rgba(255,0,136,0.12)
    );

  box-shadow:
    0 0 14px rgba(255,0,255,0.16);
}

/* TRIPLE */

#triple-indicator {

  border-color:
    rgba(0,255,120,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(0,255,120,0.14),
      rgba(0,120,60,0.12)
    );

  box-shadow:
    0 0 14px rgba(0,255,120,0.18);
}

#triple-indicator .effect-icon {

  background:
    rgba(0,255,120,0.12);

  box-shadow:
    0 0 12px rgba(0,255,120,0.25);
}

/* ICONS */

#shield-indicator .effect-icon {

  background:
    rgba(0,255,255,0.12);

  box-shadow:
    0 0 12px rgba(0,255,255,0.25);
}

#slow-indicator .effect-icon {

  background:
    rgba(255,220,0,0.12);

  box-shadow:
    0 0 12px rgba(255,220,0,0.25);
}

#multiplier-indicator .effect-icon {

  background:
    rgba(255,0,255,0.12);

  box-shadow:
    0 0 12px rgba(255,0,255,0.25);
}

/* ICON */

.effect-icon {

  width: 34px;
  height: 34px;

  border-radius: 12px;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 18px;

  background:
    rgba(255,255,255,0.08);

  box-shadow:
    0 0 12px rgba(255,255,255,0.15);
}

/* TEXT */

.effect-info {
  display: flex;
  flex-direction: column;
}

.effect-name {

  font-size: 13px;
  color: #dddddd;
}

.effect-timer {

  font-size: 15px;
  font-weight: bold;

  color: white;

  text-shadow:
    0 0 10px #00ffff;
}

/* GAME */

#game-container {
  position: relative;
  width: 800px;
  height: 400px;
  min-height: 400px;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at center, #050016, #000000 70%);
  box-shadow:
    0 0 40px rgba(0, 255, 255, 0.4),
    0 0 80px rgba(255, 0, 255, 0.3),
    inset 0 0 40px rgba(0, 0, 0, 0.9);
  margin-top: 20px;
  transition:
  filter 0.35s ease,
  opacity 0.35s ease;
}

/* HUD */

#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  z-index: 50;
  text-shadow: 0 0 8px #00ffff;
}

.hud-item {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.4);
  font-size: 14px;
}

/* PLAYER */

#player {
  position: absolute;
  z-index: 3;
  bottom: 40px;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8e9191, #4e474e);
  box-shadow:
    0 0 15px #8e9191,
    0 0 30px #4e474e;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

#player-wrap {
  position: absolute;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  pointer-events: none;
}

#player-wrap {
  bottom: 40px;
}

/* OBSTACLES */

.obstacle {
  position: absolute;
  top: -40px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ff00ff,
    #00ffff,
    #ffff00,
    #ff00ff
  );
  box-shadow:
    0 0 15px #ff00ff,
    0 0 25px #00ffff;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* COINS */

.coin {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #ffff66, #ffaa00);
  box-shadow:
    0 0 15px #ffdd33,
    0 0 30px #ffaa00;
  animation: spin 1s linear infinite;
}

/* MONEY BAGS */

.money-bag {

  position: absolute;

  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      #ffe066,
      #ff9900
    );

  box-shadow:
    0 0 16px #ffcc00,
    0 0 30px #ff8800;

  animation:
    spin 1.5s linear infinite;
}

/* POWERUPS */

.powerup {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 15px #fff;
  animation: spin 1s linear infinite;

  display: flex;
  justify-content: center;
  align-items: center;
}

.powerup-icon {
  font-size: 16px;
  font-weight: bold;
  color: rgb(0, 0, 0);
  text-shadow:
    0 0 8px rgb(0, 0, 0);
  pointer-events: none;
  animation:
    keepStill 1s linear infinite;
}

@keyframes keepStill {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

.powerup.shield {
  background: radial-gradient(circle, #00ffff, #0044ff);
}

.powerup.slow {
  background: radial-gradient(circle, #ffff00, #ff8800);
}

.powerup.multiplier {
  background: radial-gradient(circle, #ff00ff, #ff0088);
}

.powerup.triple {
  background: radial-gradient(circle, #00ff00, #00aa44);
}

/* FLASH */

#flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.9),
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
}

#flash.show {
  animation: flash-hit 0.25s ease-out;
}

@keyframes flash-hit {
  0% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
  }
}

/* GAME OVER */

#game-over-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.98)
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#game-over-screen.show {
  opacity: 1;
  pointer-events: auto;
}

#game-over-screen h1,
#pause-overlay h1 {
  font-size: 48px;
  letter-spacing: 4px;
  text-shadow:
    0 0 10px #ff0044,
    0 0 25px #ff00ff;
}

#game-over-screen p {
  font-size: 18px;
}

#pause-message {
  margin: 0;
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow:
    0 0 10px #00ffff,
    0 0 20px #ff00ff;
}

/* RESTART BUTTON */

#restart-btn {
  position: relative;
  z-index: 9998;
  margin-top: 10px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 2px solid #00ffff;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow:
    0 0 10px #00ffff,
    0 0 20px #ff00ff;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

#restart-btn:hover {
  transform: scale(1.05);
  background: rgba(0, 255, 255, 0.1);
  box-shadow:
    0 0 20px #00ffff,
    0 0 35px #ff00ff;
}

/* CONTROLS */

#controls {
  margin-top: 18px;
  font-size: 14px;
  color: #ddd;
  text-shadow: 0 0 6px #00ffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

#controls span {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.5);
}

/* CONTROL BUTTONS */

#control-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: nowrap;
}

/* RESET + INFO BUTTONS */

#reset-btn,
#info-btn,
#achievements-btn,
#prestige-btn {

  margin-top: 10px;

  padding: 6px 12px;

  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.15);

  background: rgba(255,255,255,0.05);

  color: rgba(255,255,255,0.7);

  font-size: 12px;

  font-weight: 400;

  cursor: pointer;

  opacity: 0.82;

  box-shadow: none;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

#reset-btn:hover,
#info-btn:hover,
#achievements-btn:hover,
#prestige-btn:hover {

  opacity: 1;

  color: white;

  border-color: rgba(255,255,255,0.28);

  transform: translateY(-1px);
}

/* PAUSE OVERLAY */

#pause-overlay {
  position: absolute;
  inset: 0;

  z-index: 500;

  display: none;

  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;

  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.98)
  );
}

#pause-overlay {
  text-align: center;
}

#pause-overlay h1,
#pause-overlay h2,
#pause-overlay .pause-title {
  width: 100%;
  text-align: center;
}

#pause-overlay.show {
  display: flex;
}

#pause-overlay::before,
#pause-overlay::after {
  content: "";
  flex: 0 0 3px;
  width: 65%;
  max-width: 520px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(220, 235, 255, 0.65) 12%,
    rgba(220, 235, 255, 0.65) 88%,
    transparent
  );
  box-shadow: 0 0 8px rgba(100, 150, 255, 0.35);
}

#pause-text {

  font-size: 52px;
  font-weight: 900;

  letter-spacing: 4px;
  line-height: 1;

  color: white;

  text-align: center;

  margin: 0;
  padding: 0;

  user-select: none;
  pointer-events: none;

  text-shadow:
    0 0 4px rgba(0,255,255,0.22),
    0 0 10px rgba(0,255,255,0.12);

  animation: pausePulse 2s ease-in-out infinite;
}

@keyframes pausePulse {

  0% {
    opacity: 0.92;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.015);
  }

  100% {
    opacity: 0.92;
    transform: scale(1);
  }
}

/* RESET OVERLAY */

.reset-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20000;
}

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

.reset-card {
  width: min(90%, 380px);
  padding: 24px;
  border-radius: 18px;
  background: rgba(10, 10, 30, 0.98);
  border: 1px solid rgba(0, 255, 255, 0.18);
  box-shadow:
    0 0 30px rgba(0, 255, 255, 0.08),
    0 0 80px rgba(255, 0, 255, 0.08);
  text-align: center;
}

.reset-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
  letter-spacing: 1px;
}

.reset-card p {
  margin: 10px 0;
  color: #ccc;
}

.reset-instruction {
  margin-top: 0;
  font-size: 14px;
  color: #fff;
}

#reset-confirm-input {
  width: 100%;
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
}

#reset-confirm-input:focus {
  border-color: rgba(0, 255, 255, 0.5);
}

#reset-confirm-input.input-error {
  border-color: rgba(255, 80, 100, 0.9);
  background: rgba(255, 80, 100, 0.1);
}

.reset-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.ghost-btn,
.danger-btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #ddd;
}

.danger-btn {
  background: rgba(255, 0, 100, 0.16);
  color: #ff8fb3;
  border-color: rgba(255, 0, 100, 0.32);
}

.ghost-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

/* INFO OVERLAY */
.info-card {
  max-width: 850px;
  width: 92%;
}

#leaderboard-overlay .reset-card,
#name-overlay .reset-card {
  max-width: 540px;
  width: min(90vw, 540px);
}

.leaderboard-card {
  max-height: 80vh;
  overflow: hidden;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 6px;
}

#leaderboard-list,
.update-log-list {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.04);
}

#leaderboard-list::-webkit-scrollbar,
.update-log-list::-webkit-scrollbar {
  width: 10px;
}

#leaderboard-list::-webkit-scrollbar-track,
.update-log-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
}

#leaderboard-list::-webkit-scrollbar-thumb,
.update-log-list::-webkit-scrollbar-thumb {
  background: var(--accent);
  border: 2px solid rgba(6, 8, 18, 0.96);
  border-radius: 999px;
}

#leaderboard-list .lb-row,
#leaderboard-list .lb-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 0 18px rgba(0,255,255,0.02);
}

.lb-rank {
  min-width: 48px;
  color: #00f0ff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  opacity: 0.9;
}

.lb-rank--gold {
  color: #ffd166;
}

.lb-rank--silver {
  color: #c5d0dc;
}

.lb-rank--bronze {
  color: #cf8a55;
}

.lb-name {
  flex: 1;
  color: #edf7ff;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.lb-score {
  color: #7ef9ff;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: right;
}

#leaderboard-list .lb-empty {
  justify-content: center;
  color: rgba(237,247,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.name-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.name-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.name-input:focus {
  border-color: rgba(0, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(0,255,255,0.12);
}

.name-status {
  min-height: 18px;
  color: #ff8fa8;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.info-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.info-card.info-landscape {
  display: flex;
  flex-direction: column;
  width: min(94vw, 900px);
  max-width: 900px;
  max-height: 88vh;
  min-height: min(72vh, 560px);
  padding: 22px 24px 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(6,8,18,0.98), rgba(14,18,34,0.99));
}
.info-sections.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 0;
  align-items: start;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 8px;
  padding: 0 10px 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255,255,255,0.04);
}

.info-sections.info-grid::-webkit-scrollbar {
  width: 10px;
}
.info-sections.info-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02);
  border-radius: 999px;
}
.info-sections.info-grid::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
  border: 2px solid rgba(6,8,18,0.96);
}
.info-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 15px 0 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.info-column h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 2px;
  color: #f5fbff;
  font-size: 14px;
  font-weight: 750;
}
.info-section-number {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.info-column ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.info-column li {
  color: rgba(237,247,255,0.76);
  font-size: 12px;
  line-height: 1.5;
}
.info-column li strong {
  color: #fff;
}
.info-guide-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding-bottom: 14px;
}
.info-guide-header h3 {
  margin: 0;
  text-align: left;
}
.info-guide-kicker {
  margin: 0 0 4px !important;
  color: var(--accent) !important;
  font-size: 10px;
  font-weight: 800;
}
.info-guide-intro {
  max-width: 260px;
  margin: 0 !important;
  color: rgba(237,247,255,0.62) !important;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}
.info-guide-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.info-guide-actions .ghost-btn {
  min-width: 92px;
}
.info-card.info-landscape .reset-actions {
  position: static;
}
@media (max-width: 700px) {
  .info-card.info-landscape {
    width: min(92vw, 560px);
    max-height: 92vh;
    min-height: 0;
    padding: 18px 18px 14px;
  }

  .info-sections.info-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .info-guide-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .info-guide-intro {
    max-width: none;
    text-align: left;
  }
}

.info-block {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  backdrop-filter: blur(4px);
}

.info-block h4 {
  margin-bottom: 12px;
  font-size: 18px;
  color: #00ffea;
}

.developer-credits {
  background: rgba(5, 10, 30, 0.95);
  border-color: rgba(0, 255, 255, 0.24);
  box-shadow: inset 0 0 18px rgba(0, 255, 255, 0.06);
}

#dev-overlay {
  z-index: 10000;
}

/* SHOP */

#shop {
  margin-top: 25px;
  text-align: center;
  color: #fff;
  text-shadow: 0 0 8px #00ffff;
}

#shop h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

/* SKINS */

#skins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.skin {
  min-width: 0;
  padding: 6px 4px;
  height: 56px;
  box-sizing: border-box;
  border: 1px solid #00ffff;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.skin:hover {
  background: rgba(0, 255, 255, 0.1);
  transform: translateY(-2px);
}

.skin[data-skin="phantom"],
.skin[data-skin="phantom"]:hover {
  background: transparent;
}

.skin-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

.skin[data-skin="rainbow"] .skin-name,
.skin[data-skin="rainbow"] .skin-status,
.skin[data-skin="void"] .skin-name,
.skin[data-skin="void"] .skin-status {

  color: #111;

  font-weight: 700;

  text-shadow:
    0 0 8px rgba(255,255,255,0.9),
    0 1px 2px rgba(0,0,0,0.9);
}

.skin-status {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  font-size: 10px;
  opacity: 0.9;
}

.skin.selected {
  border: 2px solid #ffffff;
  box-shadow:
    0 0 18px #00ffff,
    0 0 30px #ff00ff;
}

.skin[data-skin="cyan"] {
  border-color: #00ffff;

  box-shadow:
    0 0 12px #00ffff;
}

.skin[data-skin="pink"] {
  border-color: #ff00ff;

  box-shadow:
    0 0 12px #ff00ff;
}

.skin[data-skin="gold"] {
  border-color: #ffd700;

  box-shadow:
    0 0 14px #ffd700;
}

.skin[data-skin="galaxy"] {

  background:
    linear-gradient(
      135deg,
      #120024,
      #3b1c71,
      #7597de
    );

  border-color: #7597de;

  box-shadow:
    0 0 16px #7597de,
    0 0 28px #ff00ff;
}

.skin[data-skin="lava"] {

  background:
    linear-gradient(
      135deg,
      #220000,
      #ff2200,
      #ffaa00
    );

  border-color: #ff6600;

  box-shadow:
    0 0 16px #ff4400,
    0 0 30px #ffaa00;
}

.skin[data-skin="matrix"] {

  background:
    linear-gradient(
      135deg,
      #001100,
      #00ff00,
      #003300
    );

  border-color: #00ff00;

  box-shadow:
    0 0 16px #00ff00;
}

.skin[data-skin="rainbow"] {

  background:
    linear-gradient(
      90deg,
      red,
      orange,
      yellow,
      lime,
      cyan,
      blue,
      violet
    );

  background-size: 300% 300%;

  border-color: white;

  box-shadow:
    0 0 18px white;

  /* NEW */

  color: #111;
  text-shadow:
    0 0 6px rgba(255,255,255,0.7),
    0 1px 2px rgba(0,0,0,0.8);
}

.skin[data-skin="void"] {

  background:
    linear-gradient(
      135deg,
      #000000,
      #220044,
      #00ffff,
      #ffffff
    );

  border-color: #ffffff;

  box-shadow:
    0 0 20px #00ffff,
    0 0 40px #ffffff;

  color: #111;

  text-shadow:
    0 0 6px rgba(255,255,255,0.9),
    0 1px 2px rgba(0,0,0,0.9);
}

/* PHANTOM SKIN */

.skin[data-skin="phantom"] .skin-name,
.skin[data-skin="phantom"] .skin-status {

  color: #e8ffff;

  font-weight: 800;

  text-align: center;

  text-shadow:
    0 0 6px #00ffff,
    0 0 12px #7a2cff,
    0 1px 2px rgba(0,0,0,1);
}

/* CELESTIAL SKIN */

.skin[data-skin="celestial"] {

  background:
    linear-gradient(
      135deg,
      #dffcff,
      #8cf3ff,
      #fff6c7
    );

  border-color: #ffffff;

  box-shadow:
    0 0 18px #8cf3ff,
    0 0 35px #ffffff;

  color: #111;

  text-shadow:
    0 0 8px rgba(255,255,255,0.95),
    0 1px 2px rgba(0,0,0,0.9);
}

/* PHANTOM TEXT */

.skin[data-skin="phantom"] .skin-name,
.skin[data-skin="phantom"] .skin-status {

  color: #ffffff;

  font-weight: 800;

  text-shadow:
    0 0 10px rgba(0,255,255,0.9),
    0 0 16px rgba(140,0,255,0.9),
    0 1px 2px rgba(0,0,0,0.95);
}

/* CELESTIAL TEXT */

.skin[data-skin="celestial"] .skin-name,
.skin[data-skin="celestial"] .skin-status {

  color: #111;

  font-weight: 800;

  text-shadow:
    0 0 8px rgba(255,255,255,0.95),
    0 1px 2px rgba(0,0,0,0.9);
}

@keyframes premiumPulse {

  from {

    transform: scale(1);

    filter: brightness(1);

    box-shadow:
      0 0 12px rgba(255,255,255,0.25);
  }

  to {

    transform: scale(1.04);

    filter: brightness(1.25);

    box-shadow:
      0 0 28px rgba(255,255,255,0.65);
  }
}

/* LEGENDARY */

.legendary {
  border: 2px solid #ffd700;
  box-shadow:
    0 0 12px rgba(255, 215, 0, 0.7),
    0 0 24px rgba(255, 0, 255, 0.4);
}

@keyframes legendaryGlow {
  from {
    transform: scale(1);
    box-shadow:
      0 0 10px rgba(255, 215, 0, 0.5),
      0 0 20px rgba(255, 0, 255, 0.3);
  }

  to {
    transform: scale(1.03);
    box-shadow:
      0 0 18px rgba(255, 215, 0, 0.9),
      0 0 35px rgba(0, 255, 255, 0.5);
  }
}


@keyframes galaxyPulse {
  from {
    box-shadow:
      0 0 10px #7597de,
      0 0 20px #ff00ff;
  }

  to {
    box-shadow:
      0 0 25px #ffffff,
      0 0 40px #7597de;
  }
}


@keyframes lavaPulse {
  from {
    box-shadow:
      0 0 12px #ff2200,
      0 0 25px #ff8800;
  }

  to {
    box-shadow:
      0 0 22px #ffff00,
      0 0 40px #ff4400;
  }
}

@keyframes matrixFlicker {
  from {
    opacity: 0.8;
  }

  to {
    opacity: 1;
  }
}

.rainbow-skin {

  background-size: 300% 300%;

  animation:
    rainbowMove 3s linear infinite,
    premiumPulse 1.4s infinite alternate;
}

@keyframes rainbowMove {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

.phantom-shift {
  opacity: 0.35;
  transform: scale(1.08);
  filter: hue-rotate(40deg);
}

.celestial-surge {
  transform: scale(1.15);
  filter: brightness(1.8);
}

/* VOID EFFECT */

#void-indicator {

  border-color:
    rgba(255,255,255,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(0,0,0,0.5),
      rgba(120,0,255,0.18)
    );

  box-shadow:
    0 0 18px rgba(0,255,255,0.18);
}

#void-indicator.active,
#phantom-indicator.active,
#celestial-indicator.active {
  display: flex;
}

#phantom-indicator {

  border-color:
    rgba(0,255,255,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(0,0,0,0.55),
      rgba(120,0,255,0.22)
    );

  box-shadow:
    0 0 18px rgba(0,255,255,0.22);
}

#phantom-indicator .effect-icon {

  background:
    rgba(0,255,255,0.14);

  box-shadow:
    0 0 12px rgba(0,255,255,0.3);
}

#celestial-indicator {

  border-color:
    rgba(255,255,255,0.45);

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.12),
      rgba(120,220,255,0.18)
    );

  box-shadow:
    0 0 20px rgba(255,255,255,0.25);
}

#celestial-indicator .effect-icon {

  background:
    rgba(255,255,255,0.14);

  box-shadow:
    0 0 12px rgba(255,255,255,0.35);
}

.void-destroy {

  animation:
    voidBreak 0.25s forwards;
}

@keyframes voidBreak {

  0% {

    transform:
      scale(1)
      rotate(0deg);

    opacity: 1;

    filter: brightness(1);
  }

  40% {

    transform:
      scale(1.4)
      rotate(25deg);

    filter:
      brightness(3);
  }

  100% {

    transform:
      scale(0)
      rotate(90deg);

    opacity: 0;

    filter:
      brightness(0);
  }
}

/* STATS PANEL */

#stats-panel {

  width: 100%;

  margin-top: 10px;

  padding: 14px;

  border-radius: 22px;

  background:
    rgba(255,255,255,0.04);

  border:
    1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 0 18px rgba(0,255,255,0.08);

  display: flex;

  flex-direction: column;

  gap: 10px;
}

#stats-panel h2 {

  color: #00ffff;

  letter-spacing: 3px;

  text-align: center;

  font-size: 22px;

  margin: 0;
}

/* GRID */

.stats-grid {

  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 12px;
}

/* EACH BOX */

.stat-box {

  background:
    rgba(0,0,0,0.45);

  border:
    1px solid rgba(0,255,255,0.25);

  border-radius: 18px;

  padding: 12px 8px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-height: 78px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.stat-box:hover {

  transform: translateY(-3px);

  box-shadow:
    0 0 18px rgba(0,255,255,0.22);
}

/* LABEL */

.stat-title {

  font-size: 15px;
  color: #dddddd;
  margin-bottom: 18px;
  text-align: center;
}

/* VALUE */

.stat-value {

  font-size: 28px;
  font-weight: bold;
  color: #ffffff;
  text-shadow:
    0 0 12px #00ffff;
}

/* ROLL AREA */

#roll-area {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trail-shop-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 135, 91, 0.6);
  border-radius: 10px;
  background: linear-gradient(110deg, rgba(255, 111, 70, 0.26), rgba(245, 66, 130, 0.2));
  color: #ffe7dc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  animation: trailShopPulse 1.6s ease-in-out infinite alternate;
}

@keyframes trailShopPulse {
  from {
    box-shadow: 0 0 0 rgba(255, 135, 91, 0);
  }

  to {
    box-shadow: 0 0 16px rgba(255, 135, 91, 0.55);
  }
}

.trail-shop-btn:hover {
  transform: translateY(-2px);
  border-color: #ff9e76;
  background: linear-gradient(110deg, rgba(255, 111, 70, 0.38), rgba(245, 66, 130, 0.3));
}

.trail-shop-card {
  width: min(92vw, 500px);
  max-height: 82vh;
  overflow-y: auto;
}

.trail-shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.trail-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #edf7ff;
  text-align: left;
  cursor: pointer;
}

.trail-option:hover,
.trail-option.selected {
  border-color: var(--trail-color, #00f0ff);
  box-shadow: 0 0 12px var(--trail-color, rgba(0, 240, 255, 0.18));
}

.trail-option-preview {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--trail-color, #00f0ff);
  border-radius: 50%;
  color: var(--trail-color, #00f0ff);
  box-shadow: 0 0 12px var(--trail-color, rgba(0, 240, 255, 0.22));
}

.trail-option-preview--off {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  opacity: 0.45;
}

.trail-option[data-trail="comet"] .trail-option-preview {
  width: 22px;
  height: 8px;
  flex-basis: 34px;
  border-radius: 50%;
  background: var(--trail-color, #00f0ff);
}

.trail-option[data-trail="orbit"] .trail-option-preview {
  border-width: 2px;
  background: transparent;
  box-shadow: inset 0 0 7px var(--trail-color, rgba(0, 240, 255, 0.2)), 0 0 12px var(--trail-color, rgba(0, 240, 255, 0.22));
}

.trail-option-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.trail-option-name {
  font-weight: 800;
}

.trail-option-description,
.trail-option-status {
  color: rgba(237, 247, 255, 0.68);
  font-size: 12px;
}

.trail-shop-status {
  min-height: 18px;
  margin-top: 12px !important;
  color: #ffbd9f !important;
  font-size: 12px;
}

.player-trail-particle {
  position: absolute;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--trail-color);
  box-shadow: 0 0 8px var(--trail-color), 0 0 16px var(--trail-color);
  pointer-events: none;
  animation: trailFade 560ms ease-out forwards;
}

.player-trail-particle--comet {
  width: 18px;
  height: 5px;
  border-radius: 50%;
}

.player-trail-particle--orbit {
  width: 12px;
  height: 12px;
  border: 2px solid var(--trail-color);
  background: transparent;
}

@keyframes trailFade {
  from {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-trail-particle {
    animation-duration: 250ms;
  }
}

#roll-btn {
  padding: 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: bold;
  color: white;

  background:
    linear-gradient(
      135deg,
      #00ffff,
      #6600ff
    );

  box-shadow:
    0 0 18px #00ffff;
}

#roll-btn {
  position: relative;
  overflow: hidden;

  animation: rollPulse 2.5s ease-in-out infinite;
  box-shadow:
    0 0 10px rgba(0, 255, 255, 0.25);
}

/* SHINE EFFECT */

#roll-btn::before {
  content: "";

  position: absolute;
  top: -50%;
  left: -120%;

  width: 60%;
  height: 200%;

  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255,255,255,0.25),
      transparent
    );

  transform: rotate(25deg);

  filter: blur(1px);

  animation:
    rollShine 4s linear infinite;
}

/* SHINE SWEEP */

@keyframes rollShine {

  0% {
    left: -120%;
  }

  100% {
    left: 160%;
  }
}

/* PULSE GLOW */

@keyframes rollPulse {

  0% {
    transform: scale(1);
    box-shadow:
      0 0 8px rgba(0, 255, 255, 0.2);
  }

  50% {
    transform: scale(1.01);
    box-shadow:
      0 0 12px rgba(0, 255, 255, 0.25);
  }

  100% {
    transform: scale(1);
    box-shadow:
      0 0 8px rgba(0, 255, 255, 0.2);
  }
}

#roll-btn:hover {

  transform: scale(1.02);

  box-shadow:
    0 0 16px rgba(0, 255, 255, 0.35);
}

#roll-btn:disabled {

  opacity: 0.5;

  cursor: default;

  filter: grayscale(0.3);
}

#roll-btn:disabled,
#roll-btn.void-unlocked {

  opacity: 0.6;

  cursor: default;

  filter: grayscale(0.2);
}

#roll-result {
  text-align: center;
  font-size: 14px;
  min-height: 18px;
  color: #cccccc;

  transition:
    opacity 0.4s ease;
}

.roll-fade {
  animation: rollFade 1s ease;
}

@keyframes rollFade {

  0% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@media (max-width: 1200px) {

  #main-area {
    flex-direction: column;
    align-items: center;
  }

  #left-column {
    width: 95vw;
  }

  #game-container {
    width: 95vw;
    position: relative;
    overflow: hidden;
  }

  #sidebar {
    width: 95vw;
    max-width: 800px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* HOME SCREEN */

#home-screen {

  position: fixed;

  inset: 0;

  overflow: hidden;

  background:
    radial-gradient(circle at top, #101530, #04040d 72%);

  display: flex;

  justify-content: center;

  align-items: center;

  z-index: 9999;
}

/* GRID BACKGROUND */

#home-screen::before {

  content: "";

  position: absolute;

  inset: -50%;

  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 50px,
      rgba(0,255,255,0.035) 51px,
      transparent 52px
    );

  animation:
    homeGridMove 12s linear infinite;
}

@keyframes homeGridMove {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-120px);
  }
}

/* MAIN CONTENT */

#home-content {

  position: relative;

  z-index: 2;

  width: min(96vw, 1700px);

  height: min(94vh, 980px);

  display: flex;

  flex-direction: column;

  justify-content: center;

  gap: 28px;

  padding:
    clamp(18px, 2vw, 40px);

  box-sizing: border-box;
}

/* TOP */

#home-top {

  text-align: center;
}

/* TITLE */

#home-title {

  font-size:
    clamp(2.3rem, 5vw, 5rem);

  margin: 0;

  line-height: 0.9;

  font-weight: 900;

  letter-spacing: 4px;

  color: #59f5ff;

  text-shadow:
    0 0 8px rgba(0,255,255,0.45),
    0 0 24px rgba(0,255,255,0.25);

  animation:
    titlePulse 2.5s infinite alternate;
}

@keyframes titlePulse {

  from {

    transform: scale(1);

    text-shadow:
      0 0 8px rgba(0,255,255,0.35),
      0 0 18px rgba(0,255,255,0.18);
  }

  to {

    transform: scale(1.015);

    text-shadow:
      0 0 14px rgba(0,255,255,0.45),
      0 0 30px rgba(0,255,255,0.22);
  }
}

#home-subtitle {

  margin-top: 18px;

  font-size:
    clamp(1rem, 1.5vw, 1.4rem);

  color: #d6d6ff;

  letter-spacing: 1px;
}

/* MIDDLE LAYOUT */

#home-middle {

  display: grid;

  grid-template-columns:
    repeat(3, minmax(260px, 1fr));

  gap:
    clamp(14px, 1.2vw, 22px);

  align-items: stretch;
}

/* CARDS */

.home-card {

  background:
    rgba(8, 10, 30, 0.88);

  border:
    2px solid rgba(0,255,255,0.42);

  border-radius: 28px;

  padding:
  clamp(16px, 1.3vw, 24px);

  box-shadow:
    0 0 25px rgba(0,255,255,0.18),
    inset 0 0 25px rgba(0,255,255,0.04);

  backdrop-filter: blur(10px);

  min-height: 270px;

  display: flex;

  flex-direction: column;

  justify-content: center;
}

.home-card h3 {

  margin-top: 0;

  margin-bottom: 30px;

  text-align: center;

  font-size:
    clamp(1.2rem, 1.5vw, 1.8rem);

  color: #00f0ff;

  letter-spacing: 2px;

  text-shadow:
    0 0 15px rgba(0,255,255,0.45);
}

.home-card p {

  color: #ececff;

  font-size:
    clamp(0.92rem, 0.95vw, 1.05rem);

  line-height: 1.7;

  margin: 10px 0;
}

/* CENTER CARD */

.center-card {

  align-items: center;
}

/* BUTTONS */

#home-buttons {

  width: 100%;

  display: flex;

  flex-direction: column;

  gap: 22px;

  align-items: center;
}

/* FULLSCREEN BUTTON */

#fullscreen-btn {

  width: 100%;

  max-width: 340px;

  padding: 18px;

  border: none;

  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      #ff00aa,
      #ff5500
    );

  color: white;

  font-size:
    clamp(1.2rem, 1.5vw, 1.6rem);

  font-weight: 900;

  letter-spacing: 1px;

  cursor: pointer;

  animation:
    fullscreenPulse 1.2s infinite;

  box-shadow:
    0 0 35px rgba(255,80,0,0.65);
}

@keyframes fullscreenPulse {

  0% {

    transform: scale(1);
  }

  50% {

    transform: scale(1.05);
  }

  100% {

    transform: scale(1);
  }
}

#fullscreen-btn:hover {

  transform: scale(1.06);
}

/* MUSIC BUTTON */

#music-toggle-btn {
  width: 100%;
  max-width: 340px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: none;
  border-radius: 26px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#music-toggle-btn:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 24px rgba(0,255,255,0.2);
  transform: translateY(-1px);
}

.music-toggle-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-track-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,255,255,0.18);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.next-track-pill:hover {
  background: rgba(0,255,255,0.3);
  transform: translateX(2px);
  box-shadow: 0 0 18px rgba(0,255,255,0.18);
}

/* START BUTTON */

#start-game-btn {

  width: 100%;

  max-width: 340px;

  padding: 18px;

  border: none;

  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      #00ffff,
      #0077ff
    );

  color: white;

  font-size:
    clamp(1.3rem, 1.6vw, 1.7rem);

  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 0 35px rgba(0,255,255,0.45);

  transition:
    transform 0.2s;
}

#start-game-btn:hover {

  transform:
    scale(1.04);
}

/* STATS */

#home-stats {

  display: flex;

  flex-direction: column;

  gap: 18px;
}

.home-stat {

  padding: 16px;

  border-radius: 22px;

  background:
    rgba(255,255,255,0.04);

  border:
    1px solid rgba(0,255,255,0.22);

  color: white;

  font-size:
    clamp(1rem, 1.2vw, 1.3rem);

  font-weight: 700;

  text-align: center;
}

/* RESPONSIVE */

@media (max-width: 1200px) {

  #home-middle {

    grid-template-columns: 1fr;
  }

  .home-card {

    min-height: auto;
  }

  #home-content {

    justify-content: flex-start;

    overflow-y: auto;

    padding-top: 40px;

    padding-bottom: 40px;

    width: min(84vw, 1350px);

    height: min(82vh, 760px);
  }
}

/* FADE OUT */

#home-screen.fade-out {

  animation:
    homeFadeOut 0.7s forwards;
}

@keyframes homeFadeOut {

  to {

    opacity: 0;

    visibility: hidden;
  }
}

#pause-btn span,
#home-btn span {

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
}

/* GAME CONTROL BUTTONS */

#game-controls {
  margin-left: auto;

  display: flex;
  gap: 14px;
  align-items: center;
}

/* FIXED BUTTON SIZE + CENTERED ICONS */

#pause-btn,
#home-btn {

  width: 56px;
  height: 56px;

  min-width: 56px;
  min-height: 56px;

  border-radius: 50%;

  border: 3px solid #6a035b;

  background:
    rgba(20, 0, 40, 0.75);

  color: white;

  font-size: 24px;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  padding: 0;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;

  box-shadow:
    0 0 12px #ff2255;
}

#pause-btn:hover,
#home-btn:hover {

  transform: scale(1.08);

  box-shadow:
    0 0 24px #ff2255;
}

/* ACHIEVEMENTS */

#sidebar-achievements-btn,
#game-achievements-btn {

  color: white;

  cursor: pointer;

  border-radius: 14px;

  position: relative;

  overflow: hidden;
}

/* SIDEBAR BUTTON */

#sidebar-achievements-btn {

  padding: 10px 16px;

  margin-top: 10px;

  font-size: 13px;

  background: rgba(255, 255, 255, 0.08);

  box-shadow: none;

  animation: none;
}

.reset-btn {
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  min-width: 72px;
  height: 28px;
  font-weight: 400;
}

/* GAME BUTTON */

#game-achievements-btn {

  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;

  border-radius: 50%;

  border: 3px solid #6a035b;

  background: rgba(20, 0, 40, 0.75);

  color: white;

  font-size: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 0 12px rgba(255, 34, 85, 0.35);

  animation: none;
}

#game-achievements-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 18px rgba(255, 34, 85, 0.65);
}

/* SHINE */

#sidebar-achievements-btn::before,
#game-achievements-btn::before {
  display: none;
}

/* PULSE */

@keyframes achievementPulse {

  0% {

    transform: scale(1);

    box-shadow:
      0 0 12px #00ffff,
      0 0 24px #00ffff;
  }

  50% {

    transform: scale(1.04);

    box-shadow:
      0 0 22px #00ffff,
      0 0 50px #00ffff;
  }

  100% {

    transform: scale(1);

    box-shadow:
      0 0 12px #00ffff,
      0 0 24px #00ffff;
  }
}

/* SHINE ANIMATION */

@keyframes achievementShine {

  0% {
    left: -120%;
  }

  100% {
    left: 160%;
  }
}

/* ACHIEVEMENTS OVERLAY */
#achievements-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

/* SHOW */
#achievements-overlay.show {
  display: flex;
}

/* PANEL */
#achievements-panel {
  width: 900px;
  max-width: 92vw;
  height: 80vh;
  background: linear-gradient(180deg, #0a0f1f, #05070d);
  border: 2px solid #00ffff;
  border-radius: 22px;
  box-shadow: 0 0 35px #00ffff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HEADER */
.achievements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  color: white;
}

.achievements-header h2 {
  font-size: 28px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px #00ffff;
}

/* CLOSE BUTTON */
#close-achievements-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #00ffff, #0088ff);
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.2s;
}

#close-achievements-btn:hover {
  transform: scale(1.05);
}

/* PROGRESS BAR WRAPPER */
#achievement-progress-wrapper {
  margin-bottom: 18px;
}

/* PROGRESS BAR */
#achievement-progress-bar {
  width: 100%;
  height: 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,255,255,0.25);
}

#achievement-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ffff, #00bbff);
  box-shadow: 0 0 12px #00ffff;
  transition: width 0.4s ease;
}

/* PROGRESS TEXT */
#achievement-progress-text {
  margin-top: 6px;
  text-align: center;
  font-size: 14px;
  color: #00ffff;
  text-shadow: 0 0 6px #00ffff;
}

/* LIST */
#achievements-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 8px;
}

/* CARD (matches JS output) */
.achievement {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,255,255,0.12), rgba(0,136,255,0.12));
  border: 1px solid rgba(0,255,255,0.35);
  color: white;
  transition: 0.25s;
}

.achievement:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px #00ffff55;
}

/* LEFT SIDE (title + desc) */
.achievement-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-title {
  font-size: 18px;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 8px #00ffff;
}

.achievement-desc {
  font-size: 14px;
  opacity: 0.8;
}

/* REWARD */
.achievement-reward {
  min-width: 80px;
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  font-weight: bold;
  color: #ffdd55;
  box-shadow: 0 0 10px #ffaa00;
}

/* RIGHT SIDE OF CARD */
.achievement-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* REWARD TEXT (no border, no button look) */
.achievement-reward-text {
  font-size: 16px;
  font-weight: bold;
  color: #ffdd55;
  text-shadow: 0 0 10px #ffaa00;
}

/* CLAIM BUTTON */
.claim-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 10px;
  background: #00ff88;
  color: #003322;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 0 12px #00ff88;
}

.claim-btn:hover:not([disabled]) {
  transform: scale(1.05);
  box-shadow: 0 0 18px #00ffaa;
}

/* DISABLED CLAIM BUTTON */
.claim-btn[disabled] {
  background: rgba(0,255,150,0.15);
  color: rgba(255,255,255,0.3);
  cursor: default;
  box-shadow: none;
}

/* CLAIMED STATE */
.achievement.claimed .claim-btn {
  background: rgba(0,255,150,0.15);
  color: rgba(255,255,255,0.4);
  cursor: default;
  box-shadow: none;
}

/* ACHIEVEMENT SUBHEADINGS */
.achievement-subheading {
  font-size: 13px;
  font-weight: bold;
  color: #ff6600;
  text-transform: uppercase;
  text-shadow: 0 0 6px #ff6600;
  padding: 12px 18px 8px 18px;
  border-bottom: 1px solid rgba(255,102,0,0.3);
  margin-top: 6px;
}

/* ACHIEVEMENT PROGRESS DISPLAY - on left of reward/button */
.achievement-progress {
  font-size: 13px;
  font-weight: bold;
  color: #ff9900;
  text-shadow: 0 0 6px #ff9900;
  min-width: 55px;
  text-align: center;
  margin-right: 12px;
  align-self: center;
}

/* ACTIONS WRAPPER - keeps reward and button stacked vertically */
.achievement-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* PROGRESS ON LEFT SIDE (for locked achievements) */
.achievement-progress-left {
  font-size: 13px;
  font-weight: bold;
  color: #ff9900;
  text-shadow: 0 0 6px #ff9900;
  margin-bottom: 8px;
  text-align: left;
}

/* REMOVE DUPLICATE EFFECT CLASSES */

.phantom-shift {
  opacity: 0.35;
  transform: scale(1.08);
  filter: hue-rotate(40deg);
}

.celestial-surge {
  transform: scale(1.15);
  filter: brightness(1.8);
}

/* PERFORMANCE BOOST */

.obstacle,
.coin,
.powerup,
.skin,
#roll-btn,
#pause-btn,
#home-btn,
.achievement-card {
  will-change: transform, opacity;
}

/* RESPONSIVE GAME WIDTH */

#left-column {
  display: flex;
  flex-direction: column;
  width: min(95vw, 800px);
}

#active-effects {
  width: 100%;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#game-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 400px;
  min-height: 400px;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at center, #050016, #000000 70%);
  box-shadow:
    0 0 40px rgba(0, 255, 255, 0.4),
    0 0 80px rgba(255, 0, 255, 0.3),
    inset 0 0 40px rgba(0, 0, 0, 0.9);
  margin-top: 20px;
  transition:
    filter 0.35s ease,
    opacity 0.35s ease;
}

/* REMOVE DUPLICATE GAME CONTROLS */

#game-controls {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}

/* CLEANED BUTTON STYLES */

#pause-btn,
#home-btn {

  width: 56px;
  height: 56px;

  min-width: 56px;
  min-height: 56px;

  border-radius: 50%;

  border: 3px solid #6a035b;

  background:
    rgba(20, 0, 40, 0.75);

  color: white;

  font-size: 24px;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  padding: 0;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;

  box-shadow:
    0 0 12px #ff2255;

  will-change: transform;
}

#pause-btn:hover,
#home-btn:hover {

  transform: scale(1.08);

  box-shadow:
    0 0 24px #ff2255;
}

/* BETTER MOBILE HANDLING */

@media (max-width: 1200px) {

  #main-area {
    flex-direction: column;
    align-items: center;
    margin-right: 0;
  }

  #left-column {
    width: 95vw;
  }

  #sidebar {
    width: 95vw;
    max-width: 800px;
  }

  #game-container {
    width: 100%;
    height: 400px;
  }

  #active-effects {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {

  .stats-grid {
    grid-template-columns: 1fr;
  }

  #hud {
    flex-direction: column;
    gap: 8px;
  }

  #pause-btn,
  #home-btn,
  #game-achievements-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  #home-middle {
    grid-template-columns: 1fr;
  }
}

/* ACHIEVEMENT POPUP */

#achievement-popup {
  position: fixed;
  top: 20px;
  right: -400px;
  width: 260px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  color: white;
  font-family: inherit;
  z-index: 999999;
  opacity: 0;
  transition: all 0.45s ease;
}

#achievement-popup.show {
  right: 20px;
  opacity: 1;
}

#achievement-popup-title {
  font-size: 18px;
  font-weight: bold;
  color: #00ffff;
  text-shadow: 0 0 10px #00ffff;
}

#achievement-popup-reward {
  margin-top: 6px;
  font-size: 14px;
  color: #ffdd55;
  text-shadow: 0 0 10px #ffaa00;
}

/* LOCK ICON */
.achievement-lock {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  opacity: 0.35;
  filter: grayscale(1);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: none; /* hidden by default */
}

/* Show padlock only when locked */
.achievement.locked .achievement-lock {
  display: block;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23cccccc" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17 9h-1V7a4 4 0 10-8 0v2H7a2 2 0 00-2 2v9a2 2 0 002 2h10a2 2 0 002-2v-9a2 2 0 00-2-2zm-6 7.73V18a1 1 0 102 0v-1.27a2 2 0 10-2 0zM9 7a3 3 0 016 0v2H9V7z"/></svg>');
}

.achievement-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.achievement-left-text {
  display: flex;
  flex-direction: column;
}

/* SKIN CONTEXT MENU */

#skin-context-menu {
  position: absolute;
  background: rgba(15, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
  z-index: 9999;
  cursor: pointer;

  /* REAL GRADIENT BORDER */
  border: 3px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image:
    linear-gradient(rgba(15,0,0,0.75), rgba(15,0,0,0.75)),
    linear-gradient(135deg, #ff0022, #ff3355, #ff0022);

  /* Slight neon depth */
  box-shadow:
    inset 0 0 8px #ff002233,
    0 0 12px #ff002233;

  animation: neonMenuFade 0.15s ease-out;
}

#skin-context-menu div {
  color: #ff4d6d;
  font-weight: 600;
  letter-spacing: 0.5px;

  /* Blurry neon text */
  text-shadow:
    0 0 6px #ff0033,
    0 0 12px #ff0033aa,
    0 0 18px #ff003355;
}

#skin-context-menu div:hover {
  color: #ff8095;
  text-shadow:
    0 0 8px #ff0033,
    0 0 16px #ff0033cc,
    0 0 24px #ff003388;
}

/* Fade animation */
@keyframes neonMenuFade {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#game-achievements-btn {
  position: relative;
  overflow: visible; /* IMPORTANT: allows badge to stick out */
}

.badge {
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -6px;   /* moved slightly more inside */
  right: -6px; /* moved slightly more inside */
  z-index: 9999; /* ensures badge is above button border */
}

.hidden {
  display: none;
}

#shield-timer.effect-timer {
  text-shadow: none;
  font-size: 14px;
  font-weight: 600;
  color: #aefcff;
}

#shield-timer.effect-timer:empty::before {
  content: "";
}

.next-track-btn {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  cursor: pointer;
  opacity: 0.75;
  transition: 0.2s ease;
}

.next-track-btn:hover {
  opacity: 1;
  background: rgba(0,255,255,0.1);
  transform: translateY(-1px);
}

#home-bottom-left-buttons {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 12px;
  z-index: 3000;
}

.home-small-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

  .home-small-btn:hover {
  opacity: 1;
  color: white;
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-2px);
}

#leaderboard-btn {
  z-index: 10000;
  background: rgba(16, 22, 40, 0.9);
  color: #f9fbff;
  border-color: rgba(0, 255, 255, 0.28);
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.12);
}

#leaderboard-btn:hover {
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.update-log-btn {
  position: relative;
  color: #d7fbff;
  border-color: rgba(126, 249, 255, 0.3);
}

.update-log-badge {
  position: absolute;
  top: -7px;
  right: -8px;
  padding: 3px 5px;
  border: 1px solid rgba(10, 12, 24, 0.9);
  border-radius: 999px;
  background: #ff5474;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.update-log-badge[hidden] {
  display: none;
}

.update-log-card {
  width: min(92vw, 620px);
  max-height: 82vh;
  overflow-y: auto;
  text-align: left;
}

.update-log-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.update-log-header h3 {
  margin: 0;
  text-align: left;
}

.update-log-kicker {
  margin: 0 0 5px !important;
  color: #7ef9ff !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.update-log-close-btn {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.update-log-list {
  max-height: 62vh;
  overflow-y: auto;
}

.update-log-entry {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.update-log-date {
  margin: 0 0 5px !important;
  color: rgba(237, 247, 255, 0.62) !important;
  font-size: 12px;
}

.update-log-entry h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 16px;
}

.update-log-entry ul {
  margin: 0;
  padding-left: 20px;
  color: rgba(237, 247, 255, 0.84);
  line-height: 1.55;
}

.update-log-entry li + li {
  margin-top: 5px;
}

/* Align coming soon card */
.coming-soon-card p {
  text-align: center;
  opacity: 0.7;
  font-style: italic;
}

/* Align toggle row */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Center the Close button */
#close-settings-btn {
  display: block;
  margin: 20px auto 0 auto;
}

:root {
  --accent: #00ffff;
  --accent-glow: rgba(0,255,255,0.35);
  --bg-top: #1b0033;
  --bg-mid: #02010a;
  --bg-bottom: #000000;
}

body.neonBlue  { --accent: #00ffff; --accent-glow: rgba(0,255,255,0.35); --bg-top: #08123f; --bg-mid: #02010a; --bg-bottom: #000000; }
body.neonPurple{ --accent: #b400ff; --accent-glow: rgba(180,0,255,0.35); --bg-top: #2d0038; --bg-mid: #090015; --bg-bottom: #050004; }
body.neonRed   { --accent: #ff0033; --accent-glow: rgba(255,0,51,0.35); --bg-top: #3c001a; --bg-mid: #120005; --bg-bottom: #040001; }
body.neonGreen { --accent: #00ff66; --accent-glow: rgba(0,255,102,0.35); --bg-top: #0a200d; --bg-mid: #020b03; --bg-bottom: #000000; }
body.neonGold  { --accent: #ffdd00; --accent-glow: rgba(255,221,0,0.35); --bg-top: #3b2c00; --bg-mid: #110900; --bg-bottom: #050200; }
body.neonCyber { --accent: #00ffff; --accent-glow: rgba(0,255,255,0.35); --bg-top: #00132f; --bg-mid: #001d25; --bg-bottom: #000000; }

.neon-accent {
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
}

#theme-btn {
  width: 100%;
  max-width: 340px;
  padding: 14px 18px;
  border: none;
  border-radius: 24px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#theme-btn:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 24px rgba(0,255,255,0.2);
  transform: translateY(-1px);
}

/* ==============================
   THEME MENU
   ============================== */

.theme-card {
  max-width: 520px;
  width: 92%;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #ddd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.theme-option:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
}

.theme-option.theme-active {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.theme-option.theme-active .theme-swatch {
  box-shadow: 0 0 10px var(--accent-glow);
}

.theme-swatch {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 42px;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.theme-label {
  text-align: center;
  white-space: nowrap;
}

/* Theme-specific active border colors */
body.neonBlue  .theme-option.theme-active { border-color: #00ffff; box-shadow: 0 0 16px rgba(0,255,255,0.4); }
body.neonPurple .theme-option.theme-active { border-color: #b400ff; box-shadow: 0 0 16px rgba(180,0,255,0.4); }
body.neonRed   .theme-option.theme-active { border-color: #ff0033; box-shadow: 0 0 16px rgba(255,0,51,0.4); }
body.neonGreen .theme-option.theme-active { border-color: #00ff66; box-shadow: 0 0 16px rgba(0,255,102,0.4); }
body.neonGold  .theme-option.theme-active { border-color: #ffdd00; box-shadow: 0 0 16px rgba(255,221,0,0.4); }

/* ==============================
   PRESTIGE OVERLAY
   ============================== */

.prestige-card {
  max-width: 440px;
  width: 92%;
  text-align: center;
}

.prestige-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.prestige-card.prestige-shop-card {
  max-width: 96vw;
  width: min(96vw, 880px);
  max-height: 90vh;
  height: min(90vh, 760px);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: start;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10,12,24,0.96), rgba(18,22,45,0.98));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 30px rgba(0,255,255,0.12);
}

.prestige-tokens-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
}

.prestige-shop-list {
  display: grid;
  gap: 14px;
  margin-bottom: 0;
  text-align: left;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255,255,255,0.08);
}

.prestige-shop-list::-webkit-scrollbar {
  width: 10px;
}

.prestige-shop-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
}

.prestige-shop-list::-webkit-scrollbar-thumb {
  background: rgba(0,255,255,0.4);
  border-radius: 999px;
  border: 2px solid rgba(10,12,24,0.96);
}

.prestige-shop-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0,255,255,0.6);
}

.prestige-shop-item {
  padding: 18px;
  border-radius: 18px;
  background: rgba(10, 14, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 18px rgba(0,0,0,0.12);
}

.prestige-shop-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.prestige-shop-item-label {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.prestige-shop-item-desc,
.prestige-shop-item-current {
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
}

.prestige-shop-item-current {
  margin-top: 10px;
  font-weight: 600;
  color: #fff;
}

.prestige-shop-buy-btn {
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), var(--accent));
  color: #0a101d;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 48px rgba(255,255,255,0.08);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
  text-shadow: 0 0 6px rgba(255,255,255,0.75);
}

.prestige-shop-buy-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 28px var(--accent-glow), 0 0 66px rgba(255,255,255,0.14);
  background: linear-gradient(135deg, rgba(255,255,255,1), var(--accent));
}

.prestige-shop-buy-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 0 18px var(--accent-glow), 0 0 42px rgba(255,255,255,0.1);
}

.prestige-shop-buy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.14);
  text-shadow: none;
  filter: grayscale(0.45) contrast(0.92);
  filter: grayscale(0.35);
}

.prestige-shop-summary {
  margin: 0;
  padding: 16px;
  min-height: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  height: fit-content;
  max-height: calc(90vh - 120px);
  overflow: auto;
}

.prestige-shop-summary h4 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: 1px;
}

.prestige-shop-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #ddd;
  font-size: 13px;
}

.prestige-shop-summary-row:last-child {
  margin-bottom: 0;
}

.prestige-header h3 {
  font-size: 26px;
  letter-spacing: 3px;
  color: #ffd700;
  text-shadow: 0 0 14px #ffd700, 0 0 28px rgba(255,215,0,0.5);
  margin: 0;
}

/* Landscape shop layout helpers */
.prestige-header,
.prestige-tagline,
.prestige-tokens-display {
  grid-column: 1 / -1;
}

.prestige-shop-list {
  grid-column: 1 / 2;
  margin: 0 0 8px 0;
}

.prestige-shop-summary {
  grid-column: 2 / 3;
  margin: 0;
}

.prestige-shop-card .reset-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 920px) {
  .prestige-card.prestige-shop-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(120px, 1fr) auto auto;
    max-width: 94vw;
    width: min(94vw, 620px);
    height: min(90vh, 760px);
  }

  .prestige-shop-list,
  .prestige-shop-summary {
    grid-column: 1 / -1;
  }

  .prestige-header,
  .prestige-tagline,
  .prestige-tokens-display {
    text-align: center;
  }
}

.prestige-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px #ffd700);
}

.prestige-tagline {
  color: #aaa;
  font-size: 13px;
  margin-bottom: 20px;
}

.prestige-requirements {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.prestige-req {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.2s, background 0.2s;
}

.prestige-req.req-met {
  border-color: rgba(0,255,100,0.4);
  background: rgba(0,255,100,0.07);
}

.req-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.req-text {
  flex: 1;
  text-align: left;
  font-size: 14px;
  color: #ccc;
}

.req-status {
  font-size: 18px;
  font-weight: bold;
  color: #ff4466;
  transition: color 0.2s;
  min-width: 20px;
  text-align: center;
}

.prestige-req.req-met .req-status {
  color: #00ff88;
}

.prestige-req.req-met .req-text {
  color: #fff;
}

.prestige-what-resets {
  font-size: 12px;
  color: #888;
  margin: 12px 0 6px;
  line-height: 1.6;
}

#prestige-confirm-input {
  width: 100%;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

#prestige-confirm-input:focus {
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 10px rgba(255,215,0,0.15);
}

.secondary-btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.prestige-confirm-btn {
  background: rgba(255,215,0,0.16) !important;
  color: #ffd700 !important;
  border-color: rgba(255,215,0,0.4) !important;
  font-weight: 700;
  letter-spacing: 1px;
}

.prestige-confirm-btn:hover {
  background: rgba(255,215,0,0.26) !important;
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

/* ==============================
   PRESTIGE BADGE IN HOME STATS
   ============================== */

.prestige-stat {
  border-color: rgba(255,215,0,0.4) !important;
  background: rgba(255,215,0,0.06) !important;
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* ==============================
   PRESTIGE BADGE IN HUD (SIDEBAR)
   ============================== */


/* ==============================
   PRESTIGE INPUT ERROR STATE
   ============================== */

@keyframes prestigeBuzz {
  0%   { transform: translateX(0);    border-color: rgba(255,215,0,0.9); }
  15%  { transform: translateX(-6px); border-color: rgba(255,215,0,0.9); }
  30%  { transform: translateX(6px);  border-color: rgba(255,215,0,0.9); }
  45%  { transform: translateX(-5px); border-color: rgba(255,215,0,0.9); }
  60%  { transform: translateX(5px);  border-color: rgba(255,215,0,0.9); }
  75%  { transform: translateX(-3px); border-color: rgba(255,215,0,0.9); }
  90%  { transform: translateX(3px);  border-color: rgba(255,215,0,0.9); }
  100% { transform: translateX(0);    border-color: rgba(255,215,0,0.9); }
}

#prestige-confirm-input.prestige-input-error {
  animation: prestigeBuzz 0.55s ease;
  border-color: rgba(255,215,0,0.9) !important;
  background: rgba(255,215,0,0.08) !important;
  box-shadow: 0 0 14px rgba(255,215,0,0.35) !important;
}

/* Unmet requirement row shake */
@keyframes reqShake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-5px); }
  40%  { transform: translateX(5px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.prestige-req.req-error {
  animation: reqShake 0.5s ease;
  border-color: rgba(255,80,100,0.6) !important;
  background: rgba(255,80,100,0.08) !important;
}

/* ==============================
   DAILY CHALLENGES CARD
   ============================== */

#daily-challenges-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-challenge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.3s, background 0.3s, opacity 0.5s;
  font-size: 13px;
  color: #ccc;
  min-height: 44px;
}

.daily-challenge-item.dc-complete {
  border-color: rgba(0,255,100,0.5);
  background: rgba(0,255,100,0.08);
  color: #fff;
}

.daily-challenge-item.dc-dimmed {
  opacity: 0.45;
  filter: grayscale(0.5);
}

.dc-tick {
  font-size: 18px;
  min-width: 22px;
  text-align: center;
  transition: color 0.3s;
}

.daily-challenge-item.dc-complete .dc-tick {
  color: #00ff88;
  text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88aa;
  animation: dcTickPulse 1.2s ease-out;
}

.daily-challenge-item.dc-dimmed .dc-tick {
  color: #00cc66;
  text-shadow: none;
}

@keyframes dcTickPulse {
  0%   { transform: scale(0.5); opacity: 0; }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1);   opacity: 1; }
}

.dc-text { flex: 1; }

.dc-progress {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.daily-challenge-item.dc-complete .dc-progress {
  color: #00ff88;
}

.daily-claim-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(0,180,255,0.25);
  background: rgba(0,180,255,0.07);
  color: rgba(0,180,255,0.45);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: not-allowed;
  transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
  margin-top: 4px;
}

.daily-claim-btn.active {
  border-color: rgba(0,180,255,0.7);
  background: rgba(0,180,255,0.18);
  color: #00b4ff;
  text-shadow: 0 0 10px #00b4ff;
  box-shadow: 0 0 18px rgba(0,180,255,0.25);
  cursor: pointer;
  animation: claimPulse 2s ease-in-out infinite;
}

@keyframes claimPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0,180,255,0.25); }
  50%       { box-shadow: 0 0 32px rgba(0,180,255,0.5);  }
}

.daily-claim-btn.active:hover {
  transform: translateY(-2px);
  background: rgba(0,180,255,0.28);
}

.daily-countdown {
  text-align: center;
  font-size: 13px;
  color: #888;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ==============================
   PRESTIGE STAT BOX (IN-GAME)
   ============================== */

.stat-box-prestige {
  border-color: rgba(255,215,0,0.4) !important;
  background: rgba(255,215,0,0.06) !important;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.18s;
}

.stat-box-prestige:hover {
  border-color: rgba(255,215,0,0.75) !important;
  background: rgba(255,215,0,0.13) !important;
  box-shadow: 0 0 18px rgba(255,215,0,0.22);
  transform: translateY(-2px);
}

.prestige-stat-value {
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255,215,0,0.6);
}

/* ==============================
   NEW PRESTIGE MODAL
   ============================== */

.prestige-modal-card {
  max-width: 420px;
  width: 92%;
  text-align: center;
}

.prestige-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.prestige-modal-header h3 {
  font-size: 22px;
  letter-spacing: 2px;
  color: #ffd700;
  text-shadow: 0 0 14px #ffd700, 0 0 28px rgba(255,215,0,0.5);
  margin: 0;
}

.prestige-modal-desc {
  font-size: 13.5px;
  color: #bbb;
  line-height: 1.7;
  margin-bottom: 10px;
}

.prestige-modal-desc strong { color: #fff; }

.prestige-modal-warning {
  font-size: 12px;
  color: #ff4466;
  text-shadow: 0 0 8px rgba(255,68,102,0.4);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.prestige-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.prestige-modal-confirm-btn {
  background: rgba(255,0,40,0.18) !important;
  color: #ff3355 !important;
  border-color: rgba(255,0,40,0.5) !important;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.prestige-modal-confirm-btn:hover:not(:disabled) {
  background: rgba(255,0,40,0.3) !important;
  box-shadow: 0 0 20px rgba(255,0,40,0.35);
}

.prestige-modal-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==============================
   TOAST NOTIFICATION
   ============================== */

.neon-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10,10,25,0.92);
  border: 1px solid rgba(0,255,150,0.4);
  color: #00ff88;
  text-shadow: 0 0 10px #00ff88;
  box-shadow: 0 0 24px rgba(0,255,100,0.25);
  padding: 12px 26px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 99999;
  white-space: nowrap;
}

.neon-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* GUMMY BOOST GLOW */
.gummy-boost {
    box-shadow:
        0 0 15px #ff69b4,
        0 0 30px #ff69b4,
        0 0 50px #6fdcff,
        0 0 80px #6fdcff !important;
}