:root {
  color-scheme: light dark;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f111a;
  color: #f4f5ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  background: radial-gradient(circle at top, #1c1e31, #0b0c13 70%);
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.app-header h1 {
  margin: 0.25rem 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

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

.muted {
  color: #b0b3d6;
}

.small {
  font-size: 0.85rem;
}

.status-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #24263b;
  color: #fff;
  font-size: 0.85rem;
  align-self: center;
}

.status-chip[data-state="online"] {
  background: #1e9c5b;
}

.layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.panel {
  background: rgba(19, 21, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.scoreboard .team {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
}

.team-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #8b8fff;
  text-transform: uppercase;
}

.team-name {
  display: block;
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.scoreboard .score {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
}

.scoreboard .clock {
  padding: 1rem;
  background: #181a2c;
  border-radius: 12px;
}

.scoreboard .clock strong {
  font-size: clamp(2.8rem, 6vw, 4rem);
}

.label {
  display: block;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: #8b8fff;
}

.team-controls {
  display: grid;
  gap: 1rem;
}

@media (min-width: 600px) {
  .team-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.team-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-card header h3 {
  margin: 0;
}

.score-display {
  background: #0e1122;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

input[type="text"],
input[type="number"] {
  background: rgba(8, 9, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: inherit;
  font-size: 1rem;
}

input[readonly] {
  opacity: 0.8;
}

button {
  background: #5c63ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

button.full-width {
  width: 100%;
}

.score-buttons {
  display: flex;
  gap: 0.5rem;
}

.inline-input {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.clock-controls .primary-actions {
  display: flex;
  gap: 0.5rem;
}

.routes-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.routes-table th,
.routes-table td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.routes-table code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.routes-table input {
  width: 100%;
}
