/* Team Event – Louvre game */
:root {
  --bg: #1a1625;
  --surface: #252030;
  --card: #2d2838;
  --gold: #c9a227;
  --gold-dim: #a68b2a;
  --cream: #f5f0e6;
  --muted: #8a8494;
  --error: #c75c5c;
  --success: #5c9e6b;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--cream);
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 0;
  color: var(--gold);
  text-align: center;
}

h2 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--gold-dim);
}

/* Landing */
.landing .tagline {
  text-align: center;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.code-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.code-form input[type="text"] {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--card);
  border-radius: 6px;
  background: var(--surface);
  color: var(--cream);
  min-width: 180px;
}

.code-form button,
.answer-form button,
.challenge-form button,
.team-form button {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.code-form button:hover,
.answer-form button:hover {
  background: var(--gold-dim);
  color: var(--cream);
}

/* Reveal */
.reveal {
  text-align: center;
  padding: 3rem 1rem;
}

.reveal .destination {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  margin: 1.5rem 0;
}

.reveal .message {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Challenges */
.team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.team-header .link {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  padding: 0;
}

.progress {
  text-align: center;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.challenge {
  background: var(--card);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--surface);
}

.challenge.solved {
  border-left-color: var(--success);
}

.challenge .description {
  margin: 0.5rem 0 1rem;
  color: var(--cream);
}

.challenge .clue {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 6px;
  color: var(--gold-dim);
}

.answer-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.answer-form input[type="text"] {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--surface);
  border-radius: 6px;
  background: var(--bg);
  color: var(--cream);
  flex: 1;
  min-width: 140px;
}

.answer-form input.wrong {
  border-color: var(--error);
}

.wrong-msg {
  color: var(--error);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

.just-solved {
  color: var(--success);
  margin: 0.5rem 0 0;
}

.error {
  color: var(--error);
  text-align: center;
  margin-bottom: 1rem;
}

/* Admin */
.admin-login {
  max-width: 320px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: 12px;
}

.admin-login form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-login input {
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid var(--surface);
  border-radius: 6px;
  background: var(--bg);
  color: var(--cream);
}

.admin-dashboard .admin-table,
.admin-challenges .admin-table,
.admin-teams .admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.admin-table th,
.admin-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--surface);
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
}

.admin-table code {
  background: var(--surface);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.admin-table a {
  color: var(--gold);
  margin-right: 1rem;
}

.admin-challenges .challenge-form,
.admin-teams .team-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.challenge-form label,
.team-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.challenge-form input,
.challenge-form textarea,
.team-form input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--surface);
  border-radius: 6px;
  background: var(--bg);
  color: var(--cream);
  font-family: inherit;
}

.challenge-form textarea {
  min-height: 80px;
  resize: vertical;
}

.admin-challenges h2:first-of-type,
.admin-teams h2:first-of-type {
  margin-top: 0;
}
