:root {
  --bg-deep: #0f0a1e;
  --bg-mid: #1a1230;
  --gold: #f5c842;
  --gold-dark: #c9a020;
  --coral: #ff6b5b;
  --text: #f8f6ff;
  --text-muted: #a89ec4;
  --panel-bg: rgba(26, 18, 48, 0.92);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

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

body {
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: var(--bg-deep);
  overflow-x: hidden;
}

.spotlight-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(245, 200, 66, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(255, 107, 91, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 80%, rgba(100, 180, 255, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.site-nav {
  position: relative;
  z-index: 10;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0;
}

.site-nav-link {
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.header,
.container {
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0.5rem;
}

.logo {
  font-size: 2.8rem;
  filter: drop-shadow(0 0 12px rgba(245, 200, 66, 0.4));
}

.header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

.tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2.5rem;
}

.panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 200, 66, 0.15);
}

.panel h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  min-height: 1.5rem;
}

.team-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.team-name {
  flex: 1;
  font-weight: 500;
}

.remove-team-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.remove-team-btn:hover {
  color: var(--coral);
}

.empty-teams {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.team-list-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.import-section {
  margin-bottom: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.import-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.import-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.import-tab {
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.import-tab.active {
  background: rgba(245, 200, 66, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.import-panel {
  display: none;
}

.import-panel.active {
  display: block;
}

.import-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.import-row input,
.add-team-row input,
#import-section textarea,
textarea#yahoo-teams {
  flex: 1;
  min-width: 120px;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

textarea#yahoo-teams {
  width: 100%;
  margin-bottom: 0.5rem;
  resize: vertical;
}

.add-team-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.setup-actions,
.results-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pick-direction-section {
  margin-bottom: 1.25rem;
}

.pick-direction-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.pick-direction-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.pick-dir-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 72px;
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.pick-dir-btn:hover {
  border-color: rgba(245, 200, 66, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.pick-dir-btn:active {
  transform: translateY(0);
}

.pick-dir-btn.active {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(245, 200, 66, 0.22) 0%, rgba(245, 200, 66, 0.08) 100%);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(245, 200, 66, 0.25), 0 4px 16px rgba(245, 200, 66, 0.15);
}

.pick-dir-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.pick-dir-range {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.8;
}

.pick-dir-btn.active .pick-dir-range {
  opacity: 1;
  color: var(--gold);
}

@media (max-width: 480px) {
  .pick-direction-options {
    grid-template-columns: 1fr;
  }
}

.btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #1a1028;
  box-shadow: 0 4px 16px rgba(245, 200, 66, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 200, 66, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Wheel layout */
.wheel-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: start;
}

.wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spin-prompt {
  font-size: 1.1rem;
  text-align: center;
}

.spin-prompt strong {
  color: var(--gold);
  font-size: 1.3rem;
}

.wheel-assembly {
  position: relative;
  width: min(340px, 85vw);
  height: min(340px, 85vw);
}

.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid var(--coral);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  z-index: 5;
}

.wheel-outer-ring {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 50%, var(--gold) 100%);
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
}

.wheel-spinner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 4s cubic-bezier(0.15, 0.85, 0.2, 1);
}

.wheel-spinner.spinning-fast {
  transition: transform 0.1s linear;
}

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

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a1f4e, #1a1230);
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  z-index: 4;
  pointer-events: none;
}

.btn-spin {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 2.5rem;
  background: linear-gradient(135deg, var(--coral) 0%, #e04a3a 100%);
  color: white;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(255, 107, 91, 0.45);
}

.btn-spin:hover:not(:disabled) {
  transform: scale(1.05);
}

.btn-spin:disabled {
  opacity: 0.5;
}

.winner-callout {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--gold);
  text-align: center;
  animation: popIn 0.4s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.draft-sidebar {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.draft-sidebar h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.live-draft-order,
.final-draft-order {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.live-draft-order li,
.final-draft-order li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.88rem;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.pick-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--gold);
  min-width: 1.5rem;
}

.picks-remaining {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.final-draft-order li {
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 18, 48, 0.95);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--gold);
  z-index: 100;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .wheel-layout {
    grid-template-columns: 1fr;
  }

  .draft-sidebar {
    order: -1;
  }
}
