:root {
  color-scheme: dark;
  font-family: "Pretendard", "Noto Sans KR", Arial, sans-serif;
  background: #09111f;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #1d4ed8, #09090f 70%);
  padding: 24px;
}

.app-shell {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: center;
}

.panel {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

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

p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.audio-toggle {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.9);
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.control-group {
  margin-bottom: 16px;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #e2e8f0;
}

.control-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.control-row input,
.control-row select {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  font-size: 0.95rem;
}

.control-row input[type="range"] {
  flex: 1.3;
  padding: 0;
  accent-color: #38bdf8;
}

.label-editors {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.editor-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 8px 10px;
}

.editor-item span {
  min-width: 72px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.editor-item input {
  flex: 1;
  border: none;
  background: transparent;
  color: white;
  font-size: 0.95rem;
  outline: none;
}

.message {
  min-height: 24px;
  color: #fde68a;
  margin-top: 10px;
}

.wheel-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.wheel-wrapper {
  position: relative;
  width: 420px;
  height: 420px;
  min-width: 420px;
  min-height: 420px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.wheel {
  width: 420px;
  height: 420px;
  min-width: 420px;
  min-height: 420px;
  max-width: 420px;
  max-height: 420px;
  border-radius: 50%;
  border: 12px solid #f8fafc;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.3);
  transition: transform 5s cubic-bezier(0.15, 0.9, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform-origin: center center;
  box-sizing: border-box;
  will-change: transform;
}

.wheel svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
}

.pointer {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #facc15;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
  z-index: 2;
  pointer-events: none;
}

.wheel-center {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.92);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  border: 4px solid #f8fafc;
  z-index: 1;
}

.spin-button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  color: white;
  min-width: 170px;
  transition: transform 0.2s ease;
}

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

.winner {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fef3c7;
  text-align: center;
  min-height: 28px;
}

