:root {
  --bg: linear-gradient(180deg, #f8fafc, #eef2ff);
  --page-bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #6b7280;
  --accent: #4f46e5;
  --card-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
  --toggle-bg: rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: linear-gradient(180deg, #071126, #0b1220);
    --page-bg: #071126;
    --panel: #071827;
    --text: #e6eef8;
    --muted: #9aa6b2;
    --accent: #7c5cff;
    --card-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
    --toggle-bg: rgba(255, 255, 255, 0.06);
  }
}

.dark {
  --bg: linear-gradient(180deg, #071126, #0b1220);
  --page-bg: #071126;
  --panel: #071827;
  --text: #e6eef8;
  --muted: #9aa6b2;
  --accent: #7c5cff;
  --card-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  --toggle-bg: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: var(--bg);
  background-color: var(--page-bg);
  color: var(--text);
}
.container {
  max-width: 560px;
  padding: 24px;
  text-align: center;
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
h1 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--text);
}
.card {
  background: var(--panel);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  min-height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.btn {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}
.btn:active {
  transform: translateY(1px);
}
.controls {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}
.footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Theme toggle */
.theme-toggle {
  background: var(--toggle-bg);
  border: 0;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}
.theme-toggle[aria-pressed="true"] {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
  .name.fade {
    animation: fade 360ms ease-in-out;
  }
}
@keyframes fade {
  0% {
    opacity: 0;
    transform: translateY(-6px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
.container {
  max-width: 480px;
  padding: 24px;
  text-align: center;
}
h1 {
  margin: 0 0 18px;
  font-size: 1.6rem;
  color: #0f172a;
}
.card {
  background: white;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
}
.name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #0b1220;
  min-height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.btn {
  appearance: none;
  border: 0;
  background: #4f46e5;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}
.btn:active {
  transform: translateY(1px);
}
.controls {
  margin-top: 10px;
  color: #6b7280;
  font-size: 0.875rem;
}
.footer {
  margin-top: 18px;
  color: #6b7280;
  font-size: 0.85rem;
}
@media (prefers-reduced-motion: no-preference) {
  .name.fade {
    animation: fade 360ms ease-in-out;
  }
}
@keyframes fade {
  0% {
    opacity: 0;
    transform: translateY(-6px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
