* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  padding: 20px;
  background: #f5f5f7;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background: #cebbfc;
  padding: 20px 24px 28px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

h1 {
  margin-top: 0;
  text-align: center;
  font-size: 1.8rem;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.input-row input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #999;
  font-size: 1rem;
}

.input-row button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #d9d9d9;
  color: #111827;
}

.btn-secondary:hover {
  background: #c4c4c4;
}

.layout {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.names-panel {
  flex: 1 1 280px;
  min-width: 260px;
}

.wheel-panel {
  flex: 1 1 320px;
  min-width: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#wheelCanvas {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.names-container {
  margin-bottom: 16px;
}

.names-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.names-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  border: 1px solid #aaa;
  background: #f9fafb;
  max-height: 260px;
  overflow-y: auto;
}

.names-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

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

.names-list button {
  border: none;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
  font-size: 0.85rem;
}

.actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin: 16px 0;
}

.result-box {
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  border-radius: 10px;
  background: white;
  border: 1px solid #aaa;
  font-size: 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-name {
  font-weight: 600;
  font-size: 1.3rem;
}

.empty-msg {
  color: #555;
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 10px;
}

.small-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #333;
  text-align: center;
}

@media (max-width: 700px) {
  .actions {
    justify-content: center;
  }

  h1 {
    font-size: 1.4rem;
  }
}
