:root {
  --bg: #101014;
  --card: #1a1a22;
  --text: #f5f5f7;
  --muted: #b8b8c4;
  --line: rgba(255, 255, 255, 0.12);
  --button: #2a2a36;
  --button-hover: #353545;
  --primary: #ffffff;
  --primary-text: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #272733 0, #101014 45%, #050507 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.hero {
  text-align: center;
  padding: 28px 0 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.intro {
  max-width: 640px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.card {
  margin-top: 22px;
  padding: 22px;
  background: rgba(26, 26, 34, 0.86);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.card p {
  color: var(--muted);
  line-height: 1.55;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--button);
  color: var(--text);
  padding: 13px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border 0.12s ease;
}

button:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

button.active {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

input[type="color"] {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--button);
  padding: 6px;
}

input[type="range"] {
  width: 100%;
}

.hint {
  margin: 14px 0 0;
  font-size: 0.95rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
}

.checkbox input {
  width: 20px;
  height: 20px;
}

.actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.primary {
  width: min(100%, 420px);
  padding: 18px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 750;
  font-size: 1.08rem;
}

.primary:hover {
  background: #f0f0f0;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  margin-top: 26px;
  font-size: 0.92rem;
}

.panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: #ffffff;
}

.panel.active {
  display: block;
}

.countdown {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: #000000;
  color: #ffffff;
  font-size: clamp(5rem, 28vw, 15rem);
  font-weight: 800;
  z-index: 10001;
}

.countdown.active {
  display: grid;
}

.exit {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10000;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 2rem;
  line-height: 1;
}

.exit:hover {
  background: rgba(0, 0, 0, 0.28);
}

@media (max-width: 600px) {
  .app {
    width: min(100% - 22px, 920px);
    padding-top: 22px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

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