* {
  box-sizing: border-box;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e9e9ee;
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: radial-gradient(circle at 20% 10%, #141423, #05050a 70%);
}

.shell {
  position: relative;
  z-index: 2;
  width: min(720px, 92vw);
  margin: 6vh auto;
  padding: 28px;
}

.glass {
  background: rgba(160, 160, 170, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

h1 {
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.muted {
  margin: 0 0 18px;
  color: rgba(233, 233, 238, 0.72);
}

.form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 12px;
  color: rgba(233, 233, 238, 0.75);
}

input {
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 20, 28, 0.35);
  color: #f2f2f7;
  outline: none;
}

input:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

button {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(220, 220, 230, 0.18);
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: rgba(220, 220, 230, 0.26);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ghost {
  margin-top: 0;
  background: transparent;
}

.msg {
  margin-top: 10px;
  color: rgba(255, 200, 200, 0.9);
  min-height: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ------------------ RUEDA (CANVAS) ------------------ */
.wheelWrap {
  position: relative;
  width: min(520px, 86vw);
  height: min(520px, 86vw);
  margin: 18px auto;
}

.wheelCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(30, 30, 40, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;

  user-select: none;
  -webkit-user-select: none;
}

/* ✅ Puntero hacia abajo */
.pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 20px solid rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}

.result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 14, 0.30);
}

.actions {
  display: flex;
  justify-content: center;
}

@media (max-width: 420px) {
  .shell { padding: 18px; }
}


/* ================= LOGIN CENTRADO ================= */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page .shell {
  margin: 0;                 /* quitamos el margin-top */
  width: min(420px, 92vw);   /* más compacto para login */
}