:root {
  --bg: #0f0c29;
  --bg2: #302b63;
  --bg3: #24243e;
  --card: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #a8a8b3;
  --accent: #ff6b6b;
  --accent2: #4ecdc4;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(160deg, var(--bg), var(--bg2), var(--bg3));
  color: var(--text);
  min-height: 100vh;
}

.app {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

header {
  text-align: center;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.wheel-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
}

#wheel {
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: #111;
}

.pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.result {
  text-align: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--card);
  font-size: 1.1rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.result.hidden {
  display: none;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #ee5a24);
  color: #fff;
  margin-bottom: 20px;
}

.btn-secondary {
  background: var(--accent2);
  color: #0f0c29;
  min-width: 48px;
}

.btn-ghost {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

#sectorInput {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
}

#sectorInput:focus {
  outline: 2px solid var(--accent2);
}

.sector-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.sector-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sector-item:last-child {
  border-bottom: none;
}

.sector-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sector-label {
  flex: 1;
  font-size: 0.95rem;
}

.sector-remove {
  background: rgba(255, 107, 107, 0.2);
  color: #ff8a8a;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.1rem;
}

.error-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #c0392b;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 100;
  max-width: 90%;
  text-align: center;
}
