/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0e0e0e;
  --surface: #151515;
  --border: #262626;
  --border-light: #333;
  --text: #e5e5e5;
  --text-muted: #737373;
  --text-dim: #525252;
  --accent: #ff4655;
  --accent-hover: #e63e4d;
  --radius: 4px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html {
  font-size: 14px;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
  width: 100%;
  padding: 20px 16px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.header h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
}

.header p {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 4px;
  margin-top: 4px;
}

/* ===== Main ===== */
.main {
  width: 100%;
  max-width: 860px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
}

/* ===== Controls ===== */
.controls {
  display: flex;
  gap: 8px;
}

.btn-spin {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 36px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border-radius: var(--radius);
  letter-spacing: 2px;
  transition: background 150ms;
}

.btn-spin:hover {
  background: var(--accent-hover);
}

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

/* ===== Result ===== */
.result-section {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.result-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.result-text.active {
  color: var(--text);
}

.result-text .highlight {
  color: var(--accent);
  font-weight: 700;
}

/* ===== Wheels Grid ===== */
.wheels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

/* ===== Wheel Section ===== */
.wheel-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.wheel-section h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  border-radius: 2px;
  padding: 1px 5px;
  letter-spacing: 0;
}

/* ===== Wheel ===== */
.wheel-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pointer {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 14px solid var(--accent);
}

.wheel-rotator {
  width: 320px;
  height: 320px;
  transition: transform 3s cubic-bezier(0.12, 0.7, 0.12, 1);
  will-change: transform;
}

.wheel-rotator.no-transition {
  transition: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== Wheel Footer ===== */
.wheel-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.btn-single {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border-radius: var(--radius);
  transition: color 150ms, border-color 150ms;
  white-space: nowrap;
}

.btn-single:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.wheel-result {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.wheel-result.active {
  color: var(--accent);
}

/* ===== Footer ===== */
.footer {
  width: 100%;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .wheels {
    grid-template-columns: 1fr;
  }

  .wheel-wrapper {
    width: 300px;
    height: 300px;
  }

  .wheel-rotator {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 420px) {
  .wheel-wrapper {
    width: 260px;
    height: 260px;
  }

  .wheel-rotator {
    width: 240px;
    height: 240px;
  }

  .result-section {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}
