:root {
  --bg: #1a0d2e;
  --card: #2a1b45;
  --accent: #8b5cf6;
  --accent-dark: #7c3aed;
  --text: #e0d7ff;
  --danger: #f87171;
  --green: #34d399;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 12px;
}

.container {
  max-width: 420px;
  margin: 0 auto;
}

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

h1 {
  font-size: 1.8rem;
  color: #ceb9ff;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
}

.roulette-container {
  position: relative;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}

.indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.2rem;
  color: var(--accent);
  z-index: 10;
}

.top    { top: -12px; }
.bottom { bottom: -12px; }

.slots {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
  border-radius: 12px;
}

.slot {
  width: 90px;
  height: 140px;
  padding: 80px;
  background: #3b2a5e;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.2s;
}

.slot img {
  width: 100px;
}

.settings {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin: 12px 0 8px;
  color: #c4b5fd;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #4b5563;
  transition: .4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.spin-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(139,92,246,0.4);
  transition: all 0.2s;
}

.spin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(139,92,246,0.5);
}

.spin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.result {
  margin-top: 24px;
  font-size: 1.6rem;
  text-align: center;
  min-height: 60px;
}