:root {
  --bg-start: #17324d;
  --bg-end: #0a1724;
  --panel: rgba(255, 255, 255, 0.9);
  --text: #102033;
  --accent: #d97d54;
  --accent-dark: #ad5d3d;
  --secondary: #30546f;
  --border: rgba(16, 32, 51, 0.12);
  --shadow: 0 22px 55px rgba(6, 18, 34, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

.landing-shell,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.landing-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.landing-card {
  max-width: 760px;
  padding: 48px;
}

.panel {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: #5a7084;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  line-height: 1.1;
}

.intro {
  font-size: 1.05rem;
  max-width: 56ch;
}

.entry-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.entry-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.entry-link:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.use-link,
.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: none;
  box-shadow: 0 14px 28px rgba(217, 125, 84, 0.25);
}

.admin-link,
.secondary-button {
  color: #fff;
  background: linear-gradient(135deg, #30546f, #22394b);
  border: none;
  box-shadow: 0 14px 28px rgba(48, 84, 111, 0.24);
}

.back-link {
  display: inline-block;
  margin: 0 0 18px;
  color: #f7f5f2;
  text-decoration: none;
}

.use-panel {
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
  width: 100%;
}

.wheel-area {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: 100%;
}

.wheel-frame {
  display: grid;
  place-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.spin-datetime {
  width: min(100%, 360px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #5f3452;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.12);
  text-align: center;
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.pointer {
  position: absolute;
  top: -8px;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 42px solid #f4f1de;
  z-index: 2;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.24));
}

#wheel-canvas {
  display: block;
  border-radius: 50%;
  max-width: 100%;
  height: auto;
}

.wheel-center {
  position: absolute;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 10px 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #ffffff 0%, #fff7fb 40%, #f3e7f0 100%);
  border: 3px solid rgba(105, 39, 86, 0.14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 1;
}

.wheel-center-top,
.wheel-center-bottom {
  display: block;
  line-height: 1;
}

.wheel-center-top {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #6b2157;
  text-transform: uppercase;
}

.wheel-center-bottom {
  font-size: 0.58rem;
  font-weight: 800;
  color: #8a5a2b;
  letter-spacing: 0.02em;
}

.result-box,
.note-box {
  width: min(100%, 520px);
  padding: 18px 20px;
  border-radius: 20px;
  background: #eef4f8;
}

.result-box span,
.feedback {
  display: block;
  margin-top: 8px;
}

.whatsapp-float {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  min-height: 58px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 18px 36px rgba(18, 140, 126, 0.34);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(18, 140, 126, 0.38);
}

.whatsapp-float:disabled {
  opacity: 0.78;
  cursor: not-allowed;
  background: linear-gradient(135deg, #8ebbaa, #72998f);
  box-shadow: 0 12px 28px rgba(72, 97, 90, 0.24);
  transform: none;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 32, 51, 0.18);
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.96);
}

input[type="color"] {
  min-height: 52px;
  padding: 6px;
}

input[type="range"] {
  padding: 0;
}

.auth-panel {
  max-width: 520px;
}

.admin-panel {
  margin-top: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 28px;
}

.hidden {
  display: none;
}

.success {
  color: #1f7a53;
}

.error {
  color: #ac3f37;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .landing-card,
  .panel {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .landing-shell,
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0 32px;
  }

  .use-panel {
    gap: 22px;
  }

  .copy-block,
  .result-box {
    width: 100%;
  }

  .pointer {
    top: -4px;
    border-left-width: 16px;
    border-right-width: 16px;
    border-top-width: 30px;
  }

  .spin-datetime {
    width: min(100%, 280px);
    padding: 7px 12px;
    font-size: 0.74rem;
  }

  .wheel-center {
    width: 56px;
    height: 56px;
    padding: 7px 5px;
  }

  .wheel-center-top {
    font-size: 0.58rem;
  }

  .wheel-center-bottom {
    font-size: 0.44rem;
  }

  .primary-button,
  .secondary-button,
  .entry-link {
    width: 100%;
  }

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: calc(100% - 28px);
    justify-content: center;
  }
}
