:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: rgba(191, 219, 254, 0.85);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.35), transparent 35%),
    linear-gradient(180deg, #0f172a 0%, var(--bg) 100%);
  color: var(--text);
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 2rem;
  padding: 3rem 1.5rem;
}

.hero {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.subtitle {
  margin: 0.75rem auto 0;
  max-width: 38rem;
  color: var(--muted);
  line-height: 1.6;
}

.project-media {
  width: min(90vw, 34rem);
  margin: 0;
  padding: 0.75rem;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(16px);
}

.project-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.32);
}

.dice-stage {
  width: min(90vw, 34rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 2rem;
  background: var(--panel);
  backdrop-filter: blur(20px);
}

.d20-view {
  position: relative;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

.d20,
.d20-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.d20 {
  filter: drop-shadow(0 18px 18px rgba(2, 6, 23, 0.45));
}

.d20-labels {
  pointer-events: none;
}

.animation-toggle {
  min-width: 10rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid rgba(125, 211, 252, 0.6);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.24);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.animation-toggle:hover {
  border-color: #7dd3fc;
  background: rgba(37, 99, 235, 0.4);
}

.animation-toggle:active {
  transform: scale(0.97);
}

.animation-toggle:disabled {
  cursor: wait;
  opacity: 0.72;
}

.animation-toggle:focus-visible {
  outline: 3px solid rgba(125, 211, 252, 0.45);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .project-media,
  .dice-stage {
    width: min(94vw, 28rem);
    border-radius: 1.5rem;
    padding: 1rem;
  }
}
