.tilleuls-wheel {
  --wheel-ink: #2a1f1a;
  --wheel-cream: #fff4e2;
  --wheel-warm: #f4c28d;
  --wheel-accent: #e76f51;
  --wheel-accent-dark: #8d3a2b;
  --wheel-green: #5f8f7a;
  --wheel-shadow: 0 18px 38px rgba(26, 18, 12, 0.18);
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 20px;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  background: radial-gradient(circle at top, #fff8ea 0%, #f3e0c7 70%, #ecd0aa 100%);
  border-radius: 24px;
  border: 1px solid #e3c9a1;
  box-shadow: var(--wheel-shadow);
  font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
  color: var(--wheel-ink);
}

.tilleuls-wheel,
.tilleuls-wheel * {
  box-sizing: border-box;
}

.tilleuls-wheel__stage {
  position: relative;
  width: clamp(280px, 70vw, 380px);
  height: clamp(280px, 70vw, 380px);
  display: grid;
  place-items: center;
}

.tilleuls-wheel__dial {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff6e5 0%, #f1d1a7 70%, #e2b982 100%);
  border: 2px solid var(--wheel-ink);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5), 0 12px 24px rgba(26, 18, 12, 0.18);
  z-index: 1;
}

.tilleuls-wheel__dial::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(42, 31, 26, 0.25) 0deg 2deg,
    transparent 2deg 16deg
  );
  opacity: 0.5;
}

.tilleuls-wheel__disc {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid var(--wheel-ink);
  background: var(--disc-segments, conic-gradient(#f9d976 0deg 90deg, #f7b267 90deg 180deg, #a8d5ba 180deg 270deg, #f79d84 270deg 360deg));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), 0 14px 26px rgba(26, 18, 12, 0.2);
  transition: transform 2.2s cubic-bezier(0.12, 0.66, 0.2, 1);
  overflow: hidden;
  z-index: 2;
}

.tilleuls-wheel__disc::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0) 60%);
  opacity: 0.7;
  pointer-events: none;
}

.tilleuls-wheel__segments {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.tilleuls-wheel__segment {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.tilleuls-wheel__segment span {
  margin-top: clamp(16px, 4vw, 22px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 2px 6px rgba(26, 18, 12, 0.18);
  border: 1px solid rgba(42, 31, 26, 0.2);
  font-size: clamp(11px, 2.4vw, 13px);
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--wheel-ink);
  white-space: nowrap;
}

.tilleuls-wheel__hub {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff5de, #e6b477 70%, #c98848 100%);
  border: 4px solid var(--wheel-ink);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.4), 0 6px 10px rgba(26, 18, 12, 0.3);
  z-index: 3;
}

.tilleuls-wheel__hub::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff9ef, #f1c28c 70%, #d2924b 100%);
  border: 2px solid var(--wheel-ink);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.tilleuls-wheel__pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(26, 18, 12, 0.25));
}

.tilleuls-wheel__pointer::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;

  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 26px solid var(--wheel-ink);
}

.tilleuls-wheel__pointer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;

  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff6e5, #f1b66b 70%, #d08648 100%);
  border: 3px solid var(--wheel-ink);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.55);
}

.tilleuls-wheel.is-spinning .tilleuls-wheel__disc {
  filter: saturate(1.05) brightness(1.02);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), 0 18px 30px rgba(26, 18, 12, 0.25);
}

.tilleuls-wheel__spin {
  border: 2px solid var(--wheel-ink);
  border-radius: 999px;
  background: linear-gradient(135deg, #f6b56b, #e76f51);
  color: var(--wheel-ink);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 7px 0 var(--wheel-ink), 0 18px 28px rgba(26, 18, 12, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tilleuls-wheel__spin:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--wheel-ink), 0 22px 32px rgba(26, 18, 12, 0.28);
}

.tilleuls-wheel__spin:active {
  transform: translateY(1px);
  box-shadow: 0 5px 0 var(--wheel-ink), 0 14px 20px rgba(26, 18, 12, 0.22);
}

.tilleuls-wheel__spin:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 5px 0 var(--wheel-ink), 0 12px 20px rgba(26, 18, 12, 0.2);
}

.tilleuls-wheel__result {
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  border-radius: 16px;
  border: 2px dashed #e3c9a1;
  background: #fff4e3;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.tilleuls-wheel[data-status="win"] .tilleuls-wheel__result {
  border-color: #9fc9b5;
  background: #e9f6ee;
}

.tilleuls-wheel[data-status="lose"] .tilleuls-wheel__result {
  border-color: #f2b4a3;
  background: #fff1ec;
}

.tilleuls-wheel[data-status="already_played"] .tilleuls-wheel__result {
  border-color: #e3c9a1;
  background: #fff4e3;
}

.tilleuls-wheel[data-status="locked"] .tilleuls-wheel__result {
  border-color: #e3c9a1;
  background: #fff4e3;
}

.tilleuls-wheel[data-status="error"] .tilleuls-wheel__result {
  border-color: #f2b4a3;
  background: #ffe8e3;
}

.tilleuls-wheel__message {
  font-size: 15px;
  font-weight: 600;
}

.tilleuls-wheel__code {
  display: inline-block;
  margin: 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--wheel-ink);
  background: #fff;
  font-size: clamp(18px, 3.6vw, 22px);
  font-weight: 800;
  letter-spacing: 2px;
}

.tilleuls-wheel__instructions,
.tilleuls-wheel__expires,
.tilleuls-wheel__last {
  font-size: 13px;
  color: #5c4337;
}
