:root {
  color-scheme: light;
  --bg: linear-gradient(160deg, #f4efe7 0%, #d9e4f5 100%);
  --panel: rgba(255, 252, 247, 0.92);
  --text: #1d2433;
  --muted: #5f6b80;
  --accent: #1b6ef3;
  --accent-dark: #1455bc;
  --border: rgba(29, 36, 51, 0.12);
  --shadow: 0 24px 70px rgba(31, 46, 77, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.card {
  width: min(100%, 440px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.lead,
.status,
label,
.state-box span {
  color: var(--muted);
}

.join-form {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

input,
button {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 16px;
  font: inherit;
}

input {
  background: #fff;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

button {
  background: var(--accent);
  color: white;
  font-weight: 700;
}

button:disabled {
  background: #98a2b3;
}

.status {
  min-height: 1.5em;
  margin: 16px 0;
}

.state-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 12px 0 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
}

.state-box strong {
  font-size: 1.5rem;
  text-align: right;
}

.cooldown-box {
  margin: -6px 0 20px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(27, 110, 243, 0.12);
  color: var(--accent-dark);
}

.cooldown-box span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.cooldown-box strong {
  font-size: 1.2rem;
}

.is-hidden {
  display: none;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.controls button {
  min-height: 88px;
  font-size: 1.2rem;
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
  }

  h1 {
    font-size: 1.7rem;
  }
}
