:root {
  color-scheme: light;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #172033;
  --muted: #637083;
  --accent: #2657d9;
  --accent-dark: #1d42a4;
  --danger: #b42318;
  --line: #d8deea;
  --shadow: 0 24px 70px rgba(23, 32, 51, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(38, 87, 217, 0.18), transparent 34rem),
    var(--bg);
}

button,
a {
  font: inherit;
}

.app {
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 56px);
}

.hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.recording {
  color: var(--danger);
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}

.lead {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.instruction {
  max-width: 820px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.58;
}

.instruction h2 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.instruction p {
  margin: 0 0 16px;
}

.example {
  width: fit-content;
  margin: 28px 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8faff;
}

.example span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.example strong {
  font-size: 1.6rem;
}

.rules {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 0 0 34px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.5;
}

.primary,
.secondary,
.ghost {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  color: #ffffff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  color: var(--text);
  background: #edf1f8;
}

.ghost {
  color: var(--accent);
  background: transparent;
}

.linkButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.taskHeader {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.timer {
  min-width: 88px;
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--accent);
  background: #eef3ff;
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.progress {
  height: 10px;
  margin: 28px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e9f3;
}

.progressBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7c9cff);
  transition: width 120ms linear;
}

.stimulus {
  display: grid;
  place-items: center;
  min-height: min(58vh, 560px);
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fbfcff;
}

.stimulus img {
  max-width: min(100%, 760px);
  max-height: min(52vh, 500px);
  object-fit: contain;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 16px;
}

.adminLogin {
  max-width: 560px;
  margin-top: 32px;
}

.adminLogin label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 800;
}

.adminLoginRow {
  display: flex;
  gap: 12px;
}

.adminLogin input {
  min-width: 0;
  flex: 1;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  font: inherit;
}

.adminToolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 28px 0;
}

.recordingList {
  display: grid;
  gap: 16px;
}

.recordingCard {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  background: #fbfcff;
}

.recordingCard h2 {
  font-size: 1.3rem;
}

@media (max-width: 640px) {
  .taskHeader {
    flex-direction: column;
  }

  .timer {
    width: 100%;
  }

  .adminLoginRow {
    flex-direction: column;
  }
}
