:root {
  --bg-main: #06112d;
  --bg-accent: #123267;
  --bg-neon: rgba(92, 234, 255, 0.2);
  --panel-top: rgba(209, 225, 247, 0.9);
  --panel-bottom: rgba(155, 183, 219, 0.9);
  --panel-border-dark: #2b3f60;
  --panel-border-light: #f4f9ff;
  --text-main: #eef6ff;
  --text-muted: #bed2f3;
  --text-deep: #11264a;
  --ok: #8ff5ff;
  --button-bg: #2f9a29;
  --button-bg-hover: #41b83a;
  --button-border: #184f13;
  --border: #7ed8ff;
}

html[data-theme="classic"] {
  --bg-main: #090d1f;
  --bg-accent: #101a3a;
  --bg-neon: rgba(110, 203, 255, 0.18);
  --panel-top: rgba(203, 218, 244, 0.9);
  --panel-bottom: rgba(154, 176, 214, 0.9);
  --panel-border-dark: #23365b;
  --panel-border-light: #eaf2ff;
  --text-main: #e9f1ff;
  --text-muted: #b7c4e7;
  --text-deep: #11264a;
  --ok: #9df6ff;
  --button-bg: #1d2a52;
  --button-bg-hover: #2e3e73;
  --button-border: #0f1731;
  --border: #6ecbff;
}

html[data-theme="pink"] {
  --bg-main: #1a1027;
  --bg-accent: #2a1740;
  --bg-neon: rgba(255, 144, 247, 0.2);
  --panel-top: rgba(247, 219, 247, 0.9);
  --panel-bottom: rgba(221, 171, 221, 0.9);
  --panel-border-dark: #6b3073;
  --panel-border-light: #ffeefe;
  --text-main: #ffeefe;
  --text-muted: #f6c9ff;
  --text-deep: #2a1027;
  --ok: #ffd166;
  --button-bg: #3b2157;
  --button-bg-hover: #543177;
  --button-border: #201133;
  --border: #ff90f7;
}

html[data-theme="retro-pink"] {
  --bg-main: #1a0f2e;
  --bg-accent: #3d1e52;
  --bg-neon: rgba(255, 144, 247, 0.18);
  --panel-top: rgba(243, 220, 243, 0.9);
  --panel-bottom: rgba(215, 175, 215, 0.9);
  --panel-border-dark: #5a2070;
  --panel-border-light: #fef0fe;
  --text-main: #ffeefe;
  --text-muted: #f6c9ff;
  --text-deep: #35154d;
  --ok: #ffb6f6;
  --button-bg: #b83aa0;
  --button-bg-hover: #d6389f;
  --button-border: #8a2a7a;
  --border: #ff90f7;
}

html[data-theme="sunrise"] {
  --bg-main: #ffb07c;
  --bg-accent: #ffe0b2;
  --bg-neon: rgba(255, 255, 255, 0.2);
  --panel-top: rgba(255, 245, 230, 0.92);
  --panel-bottom: rgba(248, 206, 172, 0.92);
  --panel-border-dark: #b97753;
  --panel-border-light: #fff7ef;
  --text-main: #40221a;
  --text-muted: #8a4a32;
  --text-deep: #5c2f1f;
  --ok: #ff9a6e;
  --button-bg: #e67a43;
  --button-bg-hover: #ff8f56;
  --button-border: #b85a33;
  --border: #ffbd8b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  position: relative;
  overflow: hidden;
  font-family: "Tahoma", "Trebuchet MS", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 22%, rgba(138, 184, 255, 0.22), transparent 34%),
    radial-gradient(circle at 82% 26%, var(--bg-neon), transparent 38%),
    linear-gradient(165deg, var(--bg-accent), var(--bg-main));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 2px,
      rgba(146, 235, 255, 0.04) 3px
    ),
    radial-gradient(1.3px 1.3px at 16% 33%, rgba(176, 245, 255, 0.45), transparent),
    radial-gradient(1.3px 1.3px at 68% 18%, rgba(176, 245, 255, 0.38), transparent),
    radial-gradient(1.2px 1.2px at 83% 63%, rgba(176, 245, 255, 0.34), transparent);
}

.welcome-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.7rem;
  padding: 1.2rem;
}

.welcome-screen::before {
  content: "";
  position: absolute;
  width: min(520px, 94vw);
  height: min(420px, 74vh);
  border: 1px solid rgba(126, 216, 255, 0.35);
  border-radius: 4px;
  box-shadow: 0 0 30px rgba(75, 235, 255, 0.22);
  pointer-events: none;
}

.welcome-screen > * {
  position: relative;
  z-index: 1;
}

.logo {
  margin: 0 0 0.15rem;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f4fbff;
  text-shadow: 0 1px 0 rgba(15, 29, 66, 0.95), 0 0 12px rgba(108, 235, 255, 0.52);
}

.boot-text {
  margin: 0 0 0.1rem;
  color: var(--text-muted);
  min-height: 1.4rem;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.88rem;
}

.boot-text::after {
  content: "_";
  margin-left: 0.18rem;
  color: var(--ok);
  animation: blink 0.9s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.progress-track {
  position: relative;
  width: min(420px, 90vw);
  height: 16px;
  border: 1px solid #2b4e81;
  border-radius: 3px;
  margin: 0 auto;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(29, 49, 88, 0.85) 0,
      rgba(29, 49, 88, 0.85) 8px,
      rgba(18, 34, 67, 0.95) 8px,
      rgba(18, 34, 67, 0.95) 12px
    );
  box-shadow: inset 0 1px 2px rgba(3, 7, 20, 0.8), 0 0 0 1px rgba(167, 213, 255, 0.28);
}

.progress-bar {
  height: 100%;
  width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, #2aa9ff, #74dcff 55%, #9cf9ff);
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(111, 235, 255, 0.58);
}

.progress-value {
  margin: 0;
  color: #dbf5ff;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.83rem;
  letter-spacing: 0.06em;
}

.boot-log {
  margin: 0.2rem auto 0;
  padding: 0.55rem 0.7rem;
  list-style: none;
  width: min(420px, 90vw);
  min-height: 148px;
  text-align: left;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.8rem;
  color: #cce2ff;
  border: 1px solid rgba(142, 211, 255, 0.4);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(8, 19, 47, 0.94), rgba(5, 13, 31, 0.95));
  box-shadow: inset 0 0 0 1px rgba(89, 147, 209, 0.2);
}

.boot-log li + li {
  margin-top: 0.3rem;
}

.start-section {
  margin-top: 0.2rem;
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 0.45rem;
}

.ready-text {
  margin: 0 0 0.55rem;
  color: var(--ok);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.86rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.start-button {
  border: 1px solid var(--button-border);
  color: #f2ffef;
  background: var(--button-bg);
  border-radius: 999px;
  padding: 0.52rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(13, 68, 5, 0.8);
  cursor: pointer;
  opacity: 0.55;
  transform: translateY(0) scale(0.985);
  transition:
    background-color 0.2s ease,
    opacity 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
  box-shadow:
    inset 0 1px 0 rgba(188, 245, 172, 0.8),
    inset 0 -1px 0 rgba(26, 87, 19, 0.9),
    0 0 10px rgba(105, 246, 152, 0.25);
}

.start-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.1);
}

.start-section.is-ready .ready-text {
  opacity: 1;
  transform: translateY(0);
}

.start-section.is-ready .start-button {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow:
    inset 0 1px 0 rgba(188, 245, 172, 0.8),
    inset 0 -1px 0 rgba(26, 87, 19, 0.9),
    0 0 15px rgba(117, 255, 158, 0.5);
}

.start-button:hover {
  background: var(--button-bg-hover);
}

.start-button:active {
  transform: translateY(1px);
}

.hidden {
  display: none;
}