:root {
  --bg: #1B1F3B;
  --surface: #262B52;
  --surface-2: #313773;
  --accent: #FFB627;
  --accent-2: #FF6F59;
  --text: #F5F3EF;
  --text-dim: #A9AEDC;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,182,39,0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255,111,89,0.08) 0%, transparent 40%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.wrap {
  width: 100%;
  max-width: 480px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

.doodle {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 14px;
}

.doodle span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: bounce 1.4s ease-in-out infinite;
}
.doodle span:nth-child(1) { background: var(--accent); animation-delay: 0s; }
.doodle span:nth-child(2) { background: var(--accent-2); animation-delay: 0.15s; }
.doodle span:nth-child(3) { background: var(--text-dim); animation-delay: 0.3s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.6; }
  40% { transform: translateY(-8px); opacity: 1; }
}

h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h1 span { color: var(--accent); }

header p {
  color: var(--text-dim);
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

.ticket {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  position: relative;
}

.ticket::before,
.ticket::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--bg);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.ticket::before { left: -11px; }
.ticket::after { right: -11px; }

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-row input {
  flex: 1;
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.option-row input::placeholder { color: var(--text-dim); }
.option-row input:focus { border-color: var(--accent); }

.option-row.winner input {
  border-color: var(--accent);
  background: rgba(255,182,39,0.15);
}

.remove-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  line-height: 1;
  border-radius: 8px;
  flex-shrink: 0;
}
.remove-btn:hover { color: var(--accent-2); background: rgba(255,111,89,0.1); }

.add-btn {
  background: none;
  border: 2px dashed var(--surface-2);
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 20px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.add-btn:hover { border-color: var(--accent); color: var(--accent); }

.decide-btn {
  width: 100%;
  background: var(--accent);
  color: #1B1F3B;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}
.decide-btn:hover { background: #ffc352; }
.decide-btn:active { transform: scale(0.98); }
.decide-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.result {
  margin-top: 22px;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.result-value {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--accent-2);
  word-break: break-word;
}

.hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .doodle span { animation: none; }
}

.remove-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.remove-btn:disabled:hover { color: var(--text-dim); background: none; }

.add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.add-btn:disabled:hover { border-color: var(--surface-2); color: var(--text-dim); }

.decide-btn:focus-visible, .add-btn:focus-visible, .remove-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
