@font-face {
  font-family: "Monaspace Radon";
  src: url("/fonts/radon-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Monaspace Radon";
  src: url("/fonts/radon-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #120d1c;
  --surface: #1d1430;
  --surface-2: #2a1f44;
  --text: #ece6f7;
  --muted: #9a8bb8;
  --accent: #ff79c6;
  --accent-2: #bd93f9;
  --font: "Monaspace Radon", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-toggle {
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
}

.lang-toggle:hover {
  background: var(--surface-2);
}

header a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem;
}

h2 {
  font-weight: 700;
}

a {
  color: var(--accent-2);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  background: var(--surface-2);
  color: var(--text);
}

button.primary {
  background: var(--accent);
  color: #1a0e15;
  font-weight: 700;
}

button.ghost {
  background: transparent;
  color: var(--accent-2);
  padding: 0.4rem 0.6rem;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

input,
textarea {
  font: inherit;
  width: 100%;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-2);
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
}

.home-actions {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.home-actions button {
  flex: 1;
  min-width: 200px;
  padding: 1.5rem;
  font-size: 1.1rem;
}

.home-example {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.session-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.progress {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.back {
  margin-bottom: 1rem;
}

.exercise,
.exercise-edit {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.exercise h3 {
  margin-top: 0;
  color: var(--accent);
}

.description {
  color: var(--muted);
  margin-top: 0;
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.step {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.step.is-done .step-label {
  text-decoration: line-through;
  color: var(--muted);
}

.step-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  cursor: pointer;
}

.step-check input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex: none;
}

.step-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.badge {
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(189, 147, 249, 0.2);
  color: var(--accent-2);
}

.drill-start {
  margin-left: auto;
  background: var(--accent);
  color: #1a0e15;
  font-weight: 700;
}

.exercise-edit input,
.exercise-edit textarea,
.session-title-input {
  margin-bottom: 0.6rem;
}

.steps-edit {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.step-edit {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0.75rem;
}

.step-edit-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.step-edit-meta .step-duration-input {
  width: 8rem;
}

.free-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  color: var(--muted);
}

.free-toggle input {
  width: auto;
}

.exercise-edit-actions,
.create-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.create-actions {
  margin-top: 1.5rem;
}

.site-footer {
  max-width: 820px;
  margin: 2rem auto 4rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--surface-2);
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--accent-2);
}

.github-link {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  z-index: 40;
}

.github-link:hover {
  background: var(--surface-2);
  color: var(--accent);
}

#drill-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

#drill-overlay[hidden] {
  display: none;
}

.drill {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  width: min(1100px, 100%);
  max-height: 95vh;
  overflow: auto;
  position: relative;
}

.drill-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  padding: 0.2rem 0.6rem;
}

.drill-instruction {
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.drill-stage {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .drill-stage {
    grid-template-columns: 1fr 1.5fr;
    align-items: center;
  }
}

.drill-video,
.drill-pitch {
  width: 100%;
  border-radius: 10px;
  background: #000;
}

.drill-video {
  transform: scaleX(-1);
}

.drill-readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.75rem 0;
}

.drill-hz {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
}

.drill-note {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.drill-timer {
  font-size: 1.5rem;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.drill-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.drill-download {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  background: var(--accent-2);
  color: #15101f;
  font-weight: 700;
  text-decoration: none;
}

.drill-status {
  color: var(--muted);
  font-size: 0.9rem;
}
