* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #14161a;
  color: #f2f2f2;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
}

.page-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}

h1 { font-size: 1.6rem; margin: 0.2rem 0; }
h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }

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

.card {
  background: #1e2127;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.hidden { display: none !important; }

.qr-card { text-align: center; }

.qr-code {
  width: 180px;
  height: 180px;
  background: #fff;
  padding: 0.5rem;
  border-radius: 8px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10;
}

.overlay-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.overlay-card .qr-code { align-self: center; }

.btn {
  display: inline-block;
  background: #2a2e37;
  color: #f2f2f2;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: #e94f64; }
.btn-small { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.btn-big { width: 100%; padding: 1rem; font-size: 1.3rem; }
.btn-danger { background: #7a2836; }

input[type="text"], input:not([type]), input[type="number"] {
  background: #2a2e37;
  border: 1px solid #3a3f4a;
  color: #f2f2f2;
  border-radius: 8px;
  padding: 0.5rem;
  margin: 0.2rem 0;
  width: 100%;
}

.wheel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0;
}

.wheel {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  transition: transform 3.5s cubic-bezier(0.12, 0.67, 0.1, 1);
}

.pointer {
  position: absolute;
  top: -6px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #f2c14e;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
  z-index: 2;
}

.result {
  margin-top: 1rem;
  font-size: 1.4rem;
  font-weight: bold;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #2a2e37;
}

.list li.locked { opacity: 0.55; }

.drink-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cooldown {
  display: inline-block;
  min-width: 4ch;
  text-align: right;
  font-size: 0.85rem;
  color: #f2a541;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cooldown-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.cooldown-btn:hover { text-decoration: underline; }

.host-badge {
  font-size: 0.8rem;
  color: #f2c14e;
  font-weight: 600;
}

.list li:last-child { border-bottom: none; }

.stat-count {
  min-width: 3.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: bold;
}

.add-drink-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.add-drink-box input { width: auto; flex: 1; min-width: 80px; }
.add-drink-box label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.9rem; }
.hint { width: 100%; color: #9aa0ab; font-size: 0.8rem; }

.preset-drinks { margin-top: 0.8rem; }

.preset-group + .preset-group { margin-top: 0.6rem; }

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.chip {
  background: #2a2e37;
  color: #f2f2f2;
  border: 1px solid #3a3f4a;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip-added {
  opacity: 0.5;
  cursor: default;
}
