:root {
  --background: #0f172a;
  --background-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --background-opacity: 0.8;
  --background-image: url('./Backgrounds/Space.jpg');
  --background-image-next: url('./Backgrounds/Space.jpg');
  --surface: #1e293b;
  --surface-strong: #334155;
  --surface-elevated: #475569;
  --border: #334155;
  --border-strong: #64748b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --slot-empty: #334155;
  --slot-outline: #3b82f6;
  --status-correct: #00ff5e;
  --status-partial: #f2e22f;

  --red: #ef4444;
  --green: #4dee88;
  --blue: #3b82f6;
  --yellow: #eab308;
  --purple: #a855f7;
  --orange: #f97316;

  --slot-size: 68px;
  --color-button-size: 72px;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: var(--background-gradient);
  color: var(--text);
  overflow-x: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 100vh;
  width: min(100%, 500px);
}

@supports (min-height: 100dvh) {
  .app,
  body {
    min-height: 100dvh;
  }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--background-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: var(--background-opacity);
  z-index: -1;
  pointer-events: none;
  transition: opacity 2s ease-in-out;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--background-image-next);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 2s ease-in-out;
}

body.fading::before {
  opacity: 0;
}

body.fading::after {
  opacity: var(--background-opacity);
}

button {
  font: inherit;
  touch-action: manipulation;
}

.app__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
  min-height: 56px;
}

.app__title {
  margin: 0;
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-bright);
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #8b5cf6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.app__title img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.timer-display {
  display: none;
}


.startup-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000000;
  z-index: 999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  gap: 28px;
  padding: 40px 20px;
}

.startup-screen__image {
  max-width: 90vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.startup-screen__progress {
  width: min(80vw, 340px);
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.startup-screen__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
  animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.startup-screen__loading-text {
  font-family: 'Orbitron', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: text-fade 1.5s ease-in-out infinite;
}

@keyframes text-fade {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.startup-screen--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app__menu {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  padding: 0px;
  z-index: 900;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: none;
  background: rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.4);
  outline-offset: 2px;
}

.menu-toggle:hover {
  background: rgba(59, 130, 246, 0.25);
}

.menu-toggle:active {
  transform: translateY(1px);
}

.menu-toggle__bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-of-type(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-of-type(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-of-type(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  padding: 12px;
  background: var(--surface-strong);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  z-index: 10;
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: left;
  appearance: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-panel__item:hover,
.menu-panel__item:focus-visible {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.menu-panel__item--button {
  cursor: pointer;
}

.app--help {
  align-items: stretch;
  gap: 20px;
  width: min(100%, 520px);
  padding: 24px 16px 32px;
}

.help__back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.12);
  transition: background 0.2s ease, transform 0.15s ease;
}

.help__back-link:hover {
  background: rgba(37, 99, 235, 0.18);
}

.help__back-link:active {
  transform: translateY(1px);
}

.help__content {
  background: var(--surface-strong);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px 22px 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  color: var(--text);
}

.help__section + .help__section {
  margin-top: 18px;
}

.help__heading {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.help__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.help__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.6;
}

.help__list--bulleted {
  list-style: disc;
}

.help__list:not(.help__list--bulleted) {
  list-style: decimal;
}

.help__list li + li {
  margin-top: 6px;
}

.help__note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.board {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
  align-items: center;
  width: 100%;
}

.solarFlare {
  --flare-opacity: 0.3;
  --flare-blur: 12px;
  --flare-duration: 1120ms;
  --flare-rotate: 16deg;
  --flare-x0: -45%;
  --flare-y0: -8%;
  --flare-x1: 132%;
  --flare-y1: 92%;
  --flare-core: rgba(255, 249, 202, 0.95);
  --flare-hot: rgba(255, 193, 83, 0.92);
  --flare-edge: rgba(255, 93, 30, 0.68);

  position: fixed;
  inset: -16vmax;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transform: translate3d(var(--flare-x0), var(--flare-y0), 0) rotate(var(--flare-rotate));
  will-change: transform, opacity, filter;
  background:
    radial-gradient(ellipse at 22% 34%, color-mix(in oklab, var(--flare-core) 74%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse at 34% 48%, color-mix(in oklab, var(--flare-hot) 52%, transparent) 0%, transparent 62%),
    linear-gradient(116deg, transparent 39.5%, color-mix(in oklab, var(--flare-core) 75%, white 25%) 44%, color-mix(in oklab, var(--flare-hot) 82%, white 18%) 45.2%, color-mix(in oklab, var(--flare-edge) 70%, transparent) 47.2%, transparent 50.2%),
    linear-gradient(116deg, transparent 28%, color-mix(in oklab, var(--flare-core) 46%, transparent) 40%, color-mix(in oklab, var(--flare-hot) 50%, transparent) 52%, color-mix(in oklab, var(--flare-edge) 42%, transparent) 60%, transparent 72%),
    linear-gradient(116deg, transparent 45%, color-mix(in oklab, var(--flare-core) 30%, transparent) 49.5%, transparent 52%),
    linear-gradient(116deg, transparent 58%, color-mix(in oklab, var(--flare-hot) 34%, transparent) 61%, transparent 64%),
    linear-gradient(116deg, transparent 63%, color-mix(in oklab, var(--flare-core) 42%, white 8%) 64.1%, transparent 65.3%);
  filter: blur(var(--flare-blur)) saturate(1.2) brightness(1.06);
  mix-blend-mode: screen;
}

.solarFlare::before {
  content: "";
  position: absolute;
  inset: 6% -2%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at 22% 42%, color-mix(in oklab, var(--flare-core) 70%, transparent) 0 7%, transparent 40%),
    radial-gradient(ellipse at 30% 57%, color-mix(in oklab, var(--flare-hot) 56%, transparent) 0 10%, transparent 50%),
    radial-gradient(ellipse at 39% 68%, color-mix(in oklab, var(--flare-edge) 44%, transparent) 0 7%, transparent 44%),
    repeating-linear-gradient(112deg, transparent 0 12px, color-mix(in oklab, var(--flare-hot) 12%, transparent) 12px 15px, transparent 15px 23px);
  filter: blur(calc(var(--flare-blur) * 0.45)) saturate(1.18);
  transform: translate3d(-3%, 0, 0) scale(1.04, 0.98);
}

.solarFlare::after {
  content: "";
  position: absolute;
  inset: 0% -10%;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      112deg,
      rgba(255, 242, 192, 0.08) 0 2px,
      rgba(255, 242, 192, 0) 2px 7px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.08) 0 1px,
      rgba(255, 255, 255, 0) 1px 3px
    ),
    radial-gradient(circle at 28% 46%, rgba(255, 233, 170, 0.1) 0 24%, transparent 48%);
  opacity: 0;
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
}

.solarFlare.is-active {
  animation:
    solar-flare-sweep var(--flare-duration) cubic-bezier(0.2, 0.78, 0.18, 1) 1 both,
    solar-flare-breathe var(--flare-duration) ease-in-out 1 both;
}

.solarFlare.is-active::before {
  animation: solar-flare-plasma var(--flare-duration) ease-in-out 1 both;
}

.solarFlare.is-active::after {
  animation: solar-flare-noise calc(var(--flare-duration) * 0.45) steps(2, end) infinite;
}

@keyframes solar-flare-sweep {
  0% {
    opacity: 0;
    transform: translate3d(var(--flare-x0), var(--flare-y0), 0) rotate(var(--flare-rotate));
  }
  10% {
    opacity: calc(var(--flare-opacity) * 0.75);
  }
  28% {
    opacity: calc(var(--flare-opacity) * 1.08);
  }
  54% {
    opacity: var(--flare-opacity);
  }
  72% {
    opacity: calc(var(--flare-opacity) * 0.85);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--flare-x1), var(--flare-y1), 0) rotate(var(--flare-rotate));
  }
}

@keyframes solar-flare-breathe {
  0% {
    filter: blur(var(--flare-blur)) saturate(1.08) brightness(0.98);
  }
  45% {
    filter: blur(calc(var(--flare-blur) * 1.18)) saturate(1.3) brightness(1.14);
  }
  100% {
    filter: blur(calc(var(--flare-blur) * 0.92)) saturate(1.12) brightness(1.02);
  }
}

@keyframes solar-flare-plasma {
  0% {
    opacity: 0;
    transform: translate3d(-5%, 0, 0) scale(0.96, 0.92);
  }
  20% {
    opacity: calc(var(--flare-opacity) * 0.65);
    transform: translate3d(-2%, 0, 0) scale(1.08, 0.98);
  }
  55% {
    opacity: calc(var(--flare-opacity) * 0.55);
    transform: translate3d(1%, -1%, 0) scale(1.15, 1.03);
  }
  100% {
    opacity: 0;
    transform: translate3d(5%, 1%, 0) scale(1.2, 1.08);
  }
}

@keyframes solar-flare-noise {
  0% {
    opacity: 0.07;
    transform: translate3d(0, 0, 0);
  }
  33% {
    opacity: 0.15;
    transform: translate3d(0.5%, -0.4%, 0);
  }
  66% {
    opacity: 0.11;
    transform: translate3d(-0.5%, 0.3%, 0);
  }
  100% {
    opacity: 0.08;
    transform: translate3d(0.2%, -0.2%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .solarFlare.is-active {
    animation: solar-flare-fade 260ms ease-out 1 both;
  }

  .solarFlare.is-active::before,
  .solarFlare.is-active::after {
    animation: none;
    opacity: 0;
  }
}

@keyframes solar-flare-fade {
  0% { opacity: 0; }
  35% { opacity: calc(var(--flare-opacity) * 0.7); }
  100% { opacity: 0; }
}

.guess-row {
  display: grid;
  grid-template-columns: repeat(5, var(--slot-size));
  gap: 16px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.row-indicator {
  display: none;
  --burst-flare-progress: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: -22px;
  transform: translateY(-50%);
  background: rgba(148, 163, 184, 0.35);
  transition: opacity 0.15s ease;
}

.row-indicator[data-burst-flare-active="true"] {
  opacity: 1;
}

.row-indicator[data-burst-flare-active="true"]::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    #38bdf8 0deg,
    #38bdf8 calc(var(--burst-flare-progress) * 360deg),
    rgba(56, 189, 248, 0.15) calc(var(--burst-flare-progress) * 360deg),
    rgba(56, 189, 248, 0.15) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
}

.row-indicator[data-burst-flare-active="true"][data-burst-flare-urgent="true"]::after {
  background: conic-gradient(
    #f97316 0deg,
    #f97316 calc(var(--burst-flare-progress) * 360deg),
    rgba(249, 115, 22, 0.18) calc(var(--burst-flare-progress) * 360deg),
    rgba(249, 115, 22, 0.18) 360deg
  );
  animation: burst-flare-ring-urgent 220ms linear infinite;
}

.guess-row[data-burst-flare-active="true"] {
  --burst-flare-row-progress: 0;
  --burst-flare-pulse-ms: 1400ms;
  --burst-flare-hue: calc(52 - (var(--burst-flare-row-progress) * 50));
  --burst-flare-core: hsl(var(--burst-flare-hue) 98% 58%);
  --burst-flare-hot: hsl(calc(var(--burst-flare-hue) - 8) 100% 52%);
  --burst-flare-soft: hsl(calc(var(--burst-flare-hue) + 8) 100% 66% / 0.5);
  z-index: 6;
  isolation: isolate;
}

.guess-row[data-burst-flare-active="true"]::before {
  content: "";
  position: absolute;
  inset: -34px -14px;
  border-radius: 40px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 44%,
      color-mix(in oklab, var(--burst-flare-core) 88%, white 12%) 0%,
      color-mix(in oklab, var(--burst-flare-hot) 82%, transparent) 36%,
      transparent 84%);
  filter: blur(7px);
  opacity: 0.82;
  animation: burst-flare-row-pulse var(--burst-flare-pulse-ms) ease-in-out infinite;
}

.guess-row[data-burst-flare-active="true"]::after {
  content: "";
  position: absolute;
  inset: -20px -10px;
  border-radius: 30px;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg,
      color-mix(in oklab, var(--burst-flare-soft) 85%, transparent) 0%,
      color-mix(in oklab, var(--burst-flare-core) 88%, transparent) 42%,
      color-mix(in oklab, var(--burst-flare-hot) 92%, transparent) 100%);
  box-shadow:
    0 0 0 10px color-mix(in oklab, var(--burst-flare-core) 50%, transparent),
    0 0 44px color-mix(in oklab, var(--burst-flare-hot) 72%, transparent),
    0 0 96px color-mix(in oklab, var(--burst-flare-core) 46%, transparent);
  opacity: 0.84;
  animation: burst-flare-row-pulse var(--burst-flare-pulse-ms) ease-in-out infinite reverse;
}

.guess-row[data-burst-flare-active="true"] .slot {
  position: relative;
  z-index: 2;
  filter: brightness(1.06) saturate(1.12);
}

.guess-row[data-burst-flare-active="true"][data-burst-flare-urgent="true"] .slot {
  filter: brightness(1.12) saturate(1.2);
}

.slot {
  width: var(--slot-size);
  height: var(--slot-size);
  border-radius: 50%;
  background: var(--slot-empty);
  border: 2px solid transparent;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  font-size: 1.9rem;
  font-weight: 600;
  text-shadow:
    0 2px 4px rgba(15, 23, 42, 0.5),
    0 0 6px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 120ms linear;
}

.slot[data-burst-flare-hidden="true"] {
  opacity: 0.08;
  background: rgba(100, 116, 139, 0.64) !important;
  border-color: rgba(148, 163, 184, 0.4) !important;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(148, 163, 184, 0.2) !important;
  filter: grayscale(1) saturate(0) brightness(0.74);
}

.slot[data-burst-flare-hidden="true"] .slot__moon {
  opacity: 0;
}

.slot[data-burst-flare-interference-state] {
  --burst-flare-flicker-ms: 220ms;
}

.slot[data-burst-flare-interference-state="shimmer"] {
  opacity: 0.94;
  filter: brightness(1.08) saturate(0.92) blur(0.5px);
  animation: burst-flare-interference-shimmer 180ms ease-in-out infinite alternate;
}

.slot[data-burst-flare-interference-state="flicker"] {
  filter: brightness(1.02) saturate(0.9) blur(0.6px);
  animation: burst-flare-interference-flicker var(--burst-flare-flicker-ms) steps(5, end) infinite;
}

.slot[data-burst-flare-interference-state="dropout"] {
  filter: grayscale(1) saturate(0) brightness(0.72) blur(1px);
}

.slot[data-burst-flare-interference-state="recover"] {
  opacity: 0.72;
  filter: brightness(1.02) saturate(0.9) blur(0.35px);
  animation: burst-flare-interference-recover 120ms ease-out forwards;
}

.slot[data-burst-flare-interference-state="shimmer"]::after,
.slot[data-burst-flare-interference-state="flicker"]::after,
.slot[data-burst-flare-interference-state="dropout"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(248, 250, 252, 0.12) 0 1px,
      rgba(148, 163, 184, 0.02) 1px 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0 1px,
      rgba(0, 0, 0, 0.02) 1px 2px
    );
  mix-blend-mode: screen;
  opacity: 0.11;
  animation: burst-flare-interference-noise 120ms steps(2, end) infinite;
}

.slot[data-burst-flare-interference-state="flicker"]::after {
  opacity: 0.16;
}

.slot[data-burst-flare-interference-state="dropout"]::after {
  opacity: 0.18;
}

.slot[data-burst-flare-interference-state="dropout"] .slot__moon {
  opacity: 0;
}

.guess-row.active .slot {
  border-color: var(--slot-outline);
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 6px 14px rgba(59, 130, 246, 0.35);
  cursor: pointer;
}

.planet-mode .guess-row.active .slot {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 6px 14px rgba(59, 130, 246, 0.35) !important;
  border: 2px solid var(--slot-outline) !important;
}

.guess-row.active .slot[data-status="correct"] {
  border-color: var(--status-correct);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 5px rgba(34, 197, 94, 0.55),
    0 0 22px rgba(34, 197, 94, 0.65);
  transform: translateY(0);
  cursor: default;
}

.guess-row.active .slot[data-status="partial"] {
  border-color: var(--status-partial);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 5px rgba(250, 204, 21, 0.45),
    0 0 20px rgba(250, 204, 21, 0.5);
  transform: translateY(0);
  cursor: default;
}

.planet-mode .guess-row.active .slot[data-status="correct"] {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(34, 197, 94, 0.65) !important;
  border: 5px solid var(--status-correct) !important;
  transform: translateY(0);
  cursor: default;
}

.planet-mode .guess-row.active .slot[data-status="partial"] {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(250, 204, 21, 0.5) !important;
  border: 5px solid var(--status-partial) !important;
  transform: translateY(0);
  cursor: default;
}

.slot[data-color="red"],
.modal-slot[data-color="red"] {
  background: var(--red);
}

.planet-mode .slot[data-color="red"],
.planet-mode .modal-slot[data-color="red"] {
  background: transparent;
  background-image: url('./Planets/RedPlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.slot[data-color="green"],
.modal-slot[data-color="green"] {
  background: var(--green);
}

.planet-mode .slot[data-color="green"],
.planet-mode .modal-slot[data-color="green"] {
  background: transparent;
  background-image: url('./Planets/GreenPlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.slot[data-color="blue"],
.modal-slot[data-color="blue"] {
  background: var(--blue);
}

.planet-mode .slot[data-color="blue"],
.planet-mode .modal-slot[data-color="blue"] {
  background: transparent;
  background-image: url('./Planets/BluePlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.slot[data-color="yellow"],
.modal-slot[data-color="yellow"] {
  background: var(--yellow);
}

.planet-mode .slot[data-color="yellow"],
.planet-mode .modal-slot[data-color="yellow"] {
  background: transparent;
  background-image: url('./Planets/YellowPlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.slot[data-color="purple"],
.modal-slot[data-color="purple"] {
  background: var(--purple);
}

.planet-mode .slot[data-color="purple"],
.planet-mode .modal-slot[data-color="purple"] {
  background: transparent;
  background-image: url('./Planets/PurplePlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.slot[data-color="orange"],
.modal-slot[data-color="orange"] {
  background: var(--orange);
}

.planet-mode .slot[data-color="orange"],
.planet-mode .modal-slot[data-color="orange"] {
  background: transparent;
  background-image: url('./Planets/OrangePlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.slot[data-revealed="false"] {
  background: rgba(51, 65, 85, 0.8) !important;
  opacity: 0.7;
  position: relative;
  border: 2px dashed rgba(148, 163, 184, 0.6);
}

.slot[data-revealed="false"]::before {
  content: "?";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text);
  text-shadow:
    0 0 8px rgba(148, 163, 184, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.slot[data-revealed="false"]::after {
  display: none;
}

.slot__moon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #ffffff;
  z-index: 1;
}

.slot__moon svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  filter:
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.8))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.slot__moon[data-phase="new"] svg {
  width: 1.5rem;
  height: 1.5rem;
}

.slot[data-status] {
  border-width: 5px;
}

.slot--pulse {
  animation: orbit-pulse 540ms ease-out forwards;
}

.slot--pulse::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: none;
  background: transparent;
  box-shadow:
    0 0 0 2px rgba(134, 239, 172, 0.6),
    12px -6px 0 0 rgba(34, 197, 94, 0.75),
    -11px -5px 0 0 rgba(34, 197, 94, 0.55),
    9px 11px 0 0 rgba(52, 211, 153, 0.65),
    -10px 9px 0 0 rgba(16, 185, 129, 0.65);
  filter: blur(0.5px);
  opacity: 0;
  transform: scale(0.6);
  animation: orbit-sparks 480ms ease-out forwards;
}

.slot[data-status="correct"] {
  border-color: var(--status-correct);
}

.planet-mode .slot[data-status="correct"] {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 22px rgba(34, 197, 94, 0.65) !important;
  border: 5px solid var(--status-correct) !important;
}

.slot[data-status="partial"] {
  border-color: var(--status-partial);
}

.planet-mode .slot[data-status="partial"] {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(250, 204, 21, 0.5) !important;
  border: 5px solid var(--status-partial) !important;
}

.controls {
  display: grid;
  gap: 16px;
  width: 100%;
}

.palette__buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  padding: 4px 4px;
  margin: 0 auto;
  width: 100%;
}

.color-btn {
  width: var(--color-button-size);
  height: var(--color-button-size);
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--slot-empty);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1), inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.color-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.4);
  outline-offset: 3px;
}

.color-btn:active {
  transform: scale(0.95);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1), inset 0 -2px 4px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.color-btn[data-color="red"] {
  background: var(--red);
}

.planet-mode .color-btn[data-color="red"] {
  background: transparent;
  background-image: url('./Planets/RedPlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.color-btn[data-color="green"] {
  background: var(--green);
}

.planet-mode .color-btn[data-color="green"] {
  background: transparent;
  background-image: url('./Planets/GreenPlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.color-btn[data-color="blue"] {
  background: var(--blue);
}

.planet-mode .color-btn[data-color="blue"] {
  background: transparent;
  background-image: url('./Planets/BluePlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.color-btn[data-color="yellow"] {
  background: var(--yellow);
}

.planet-mode .color-btn[data-color="yellow"] {
  background: transparent;
  background-image: url('./Planets/YellowPlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.color-btn[data-color="purple"] {
  background: var(--purple);
}

.planet-mode .color-btn[data-color="purple"] {
  background: transparent;
  background-image: url('./Planets/PurplePlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.color-btn[data-color="orange"] {
  background: var(--orange);
}

.planet-mode .color-btn[data-color="orange"] {
  background: transparent;
  background-image: url('./Planets/OrangePlanet.png');
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid transparent !important;
}

.actions__buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, auto));
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto;
}

.actions__buttons[hidden] {
  display: none;
}

.actions__buttons--endgame.game-won .btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e293b;
  font-weight: 800;
  box-shadow:
    0 0 20px rgba(251, 191, 36, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid #fef3c7;
  animation: button-pulse 2s ease-in-out infinite;
}

.actions__buttons--endgame.game-won .btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(251, 191, 36, 0.8),
    0 12px 20px rgba(0, 0, 0, 0.5);
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guess-row.shake {
  animation: row-shake 220ms ease;
}

.guess-row.winning {
  position: relative;
  transform: scale(1.02);
  filter: brightness(1.05);
  transition: transform 0.3s ease, filter 0.3s ease;
}


.guess-row.winning::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  background: linear-gradient(45deg, #22c55e, #3b82f6, #a855f7, #22c55e);
  background-size: 300% 300%;
  animation: winning-border 2s linear infinite;
  z-index: -1;
}

.guess-row.winning::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 8px;
  background: var(--surface);
  z-index: -1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e293b;
  font-weight: 800;
  box-shadow:
    0 0 20px rgba(251, 191, 36, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid #fef3c7;
  animation: button-pulse 2s ease-in-out infinite;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(251, 191, 36, 0.8),
    0 12px 20px rgba(0, 0, 0, 0.5);
}

.btn--primary:disabled {
  background: var(--surface-elevated);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
  animation: none;
  border: 1px solid var(--border);
}

.btn--secondary {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e293b;
  font-weight: 800;
  box-shadow:
    0 0 20px rgba(251, 191, 36, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid #fef3c7;
  animation: button-pulse 2s ease-in-out infinite;
}

.btn--secondary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(251, 191, 36, 0.8),
    0 12px 20px rgba(0, 0, 0, 0.5);
}

.btn--ghost {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1e293b;
  font-weight: 800;
  box-shadow:
    0 0 20px rgba(251, 191, 36, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid #fef3c7;
  animation: button-pulse 2s ease-in-out infinite;
}

.btn--ghost:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(251, 191, 36, 0.8),
    0 12px 20px rgba(0, 0, 0, 0.5);
}

.btn--ghost:disabled {
  background: var(--surface-elevated);
  color: white;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
  animation: none;
  border: 1px solid var(--border);
}

.btn__label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

@keyframes burst-flare-ring-urgent {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes burst-flare-row-pulse {
  0% {
    transform: scale(0.985);
    opacity: 0.56;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
  100% {
    transform: scale(0.985);
    opacity: 0.56;
  }
}

@keyframes burst-flare-interference-shimmer {
  0% {
    opacity: 0.88;
    filter: brightness(1.02) saturate(0.9) blur(0.45px);
  }
  100% {
    opacity: 0.98;
    filter: brightness(1.1) saturate(0.96) blur(0.65px);
  }
}

@keyframes burst-flare-interference-flicker {
  0% { opacity: 1; }
  15% { opacity: 0.28; }
  28% { opacity: 0.92; }
  44% { opacity: 0.35; }
  60% { opacity: 0.86; }
  78% { opacity: 0.22; }
  100% { opacity: 0.95; }
}

@keyframes burst-flare-interference-recover {
  0% {
    opacity: 0.62;
    filter: brightness(0.92) saturate(0.82) blur(0.8px);
  }
  100% {
    opacity: 1;
    filter: brightness(1) saturate(1) blur(0);
  }
}

@keyframes burst-flare-interference-noise {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}
