:root {
  --bg: #14161c;
  --panel: #1d2028;
  --accent: #fa0633;
  --accent2: #ffd166;
  --text: #f4f4f6;
  --muted: #8b8f9c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg); /* fallback caso o background.html não carregue */
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 60px;
}
#bgFrame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border: none;
  z-index: -1;
}
h1 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.logo {
  width: 30vh;
  height: auto;
  align-self: left;
}

.layout {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  max-width: 1000px;
  width: 100%;
  margin-top: 5vh;
  gap:10vw;
}
.wheel-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.wheel-wrap {
  position: relative;
  width: 360px;
  height: 360px;
}
#wheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 0 8px #2a2e38, 0 12px 40px rgba(0,0,0,0.5);
  transition: transform 30s cubic-bezier(0.12, 0.72, 0.1, 1);
}
.pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid var(--accent);
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.hub {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 5px var(--panel), 0 2px 8px rgba(0,0,0,0.5);
  z-index: 4;
}
#spinBtn {
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #000000;
  background: linear-gradient(135deg, var(--text), #542583);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  letter-spacing: 0.5px;
  margin-top: 5vh;
  /* box-shadow: 0 6px 18px rgba(255, 209, 102, 0.3); */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* box-shadow: 0 10px 22px rgba(255, 209, 102, 0.4); */
#spinBtn:hover:not(:disabled) { transform: translateY(-2px);}
#spinBtn:disabled { opacity: 0.5; cursor: not-allowed; }
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}
.result {
  min-height: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent2);
  text-align: center;
}
.result.led {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 10px 6px;
  letter-spacing: 2px;
  color: #00e5ff;
  text-shadow: 0 0 6px currentColor, 0 0 16px currentColor;
  animation: ledHue 2s linear infinite, ledFlicker 0.12s steps(2) infinite;
}
@keyframes ledHue {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
@keyframes ledScroll {
  0% { background-position: 0% 0; }
  100% { background-position: 400% 0; }
}
@keyframes ledFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}
.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 22px;
  width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
#optionsText {
  width: 100%;
  min-height: 220px;
  padding: 12px 14px;
  background: #12141a;
  border: 1px solid #333743;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Consolas', 'Courier New', monospace;
  line-height: 1.6;
  resize: vertical;
}
#optionsText:focus { outline: 2px solid var(--accent); }
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 15, 0.72);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  z-index: 70;
}
.modal-overlay.open { display: flex; }
.modal-box {
  position: relative;
  background: var(--panel);
  border: 1px solid #333743;
  border-radius: 20px;
  padding: 48px 56px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  animation: modalPopIn 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.2);
  max-width: 90vw;
}
@keyframes modalPopIn {
  0% { opacity: 0; transform: scale(0.75) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { color: var(--accent); background: rgba(250,6,51,0.1); }