:root {
  --bg-1: #09203f;
  --bg-2: #0f172a;
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --panel: rgba(11, 21, 45, 0.72);
  --line: rgba(148, 163, 184, 0.25);
  --accent: #f59e0b;
  --accent-2: #22d3ee;
  --good: #34d399;
  --bad: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 25%, #16375f 0%, transparent 40%),
              radial-gradient(circle at 80% 10%, #0b5f71 0%, transparent 36%),
              linear-gradient(160deg, var(--bg-1), var(--bg-2));
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 320px;
  height: 320px;
  filter: blur(50px);
  opacity: 0.35;
  z-index: 0;
  animation: drift 12s ease-in-out infinite alternate;
}

.ambient-1 {
  top: -80px;
  left: -70px;
  background: #22d3ee;
}

.ambient-2 {
  right: -80px;
  bottom: -100px;
  background: #f59e0b;
  animation-delay: 1.2s;
}

.app-shell {
  width: min(920px, 94vw);
  margin: 28px auto;
  position: relative;
  z-index: 1;
  animation: fadeIn 650ms ease-out;
}

.hero {
  text-align: center;
  margin-bottom: 18px;
}

.top-links {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.admin-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 999px;
  padding: 6px 12px;
}

.admin-link:hover {
  border-color: rgba(34, 211, 238, 0.9);
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.35em;
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.78rem;
}

h1 {
  margin: 8px 0 6px;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  font-weight: 400;
  letter-spacing: 0.03em;
}

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

.timer-chip {
  margin: 12px auto 0;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.48);
  background: rgba(250, 204, 21, 0.14);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(1, 8, 22, 0.38);
  padding: 20px;
}

.user-card {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.upload-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}

select {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
}

input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.level {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.55);
  font-weight: 700;
}

h2 {
  margin: 0;
  line-height: 1.35;
  font-size: clamp(1.08rem, 2.4vw, 1.45rem);
}

.options {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-btn {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.85);
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  font-size: 0.98rem;
  transition: transform 120ms ease, border-color 160ms ease, background-color 160ms ease;
}

.option-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.65);
}

.option-btn:disabled {
  opacity: 0.72;
  cursor: default;
  transform: none;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, filter 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(120deg, #22d3ee, #facc15);
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.18);
  color: var(--ink);
  border: 1px solid var(--line);
}

.message {
  margin-top: 12px;
  min-height: 24px;
  color: var(--muted);
  font-weight: 600;
}

.message.good {
  color: var(--good);
}

.message.bad {
  color: var(--bad);
}

.actions {
  margin-top: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
}

.score-table th,
.score-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px;
}

.score-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.45);
}

.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(24px);
  }
}

@media (max-width: 700px) {
  .options {
    grid-template-columns: 1fr;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}
