:root { color-scheme: light dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(
    ellipse at 20% 20%,
    rgba(255, 255, 255, 0.894) 10%,        /* soft orange center */
    rgb(254, 254, 255) 50%,
    #f8805b 55%,
    rgba(243, 80, 4, 0.991) 100%       /* soft orange outer edge */
  );
  color: #1f2937;
}
.page { max-width: 1100px; margin: 0 auto; padding: 16px; }

.topbar { display:flex; justify-content:flex-start; margin-bottom:10px; }
.side-toggle {
  padding:8px 12px; border-radius:10px; border:0; cursor:pointer;
  background:#111827; color:#fff; box-shadow:0 4px 10px rgba(0,0,0,.15);
}

.layout { display: flex; gap: 18px; align-items: flex-start; transition: all .2s ease; }
.layout.wide { justify-content: center; }
.layout.wide .right-panel { flex: 0 1 860px; max-width: 100%; }
.layout.wide .right-panel .wheel-container { margin-left: auto; margin-right: auto; }
.layout.wide .right-panel .controls { text-align: center; }
.layout.wide .left-panel { display: none; }
.left-panel { flex: 0 0 360px; max-width: 360px; }
.right-panel { flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .right-panel { max-width: 100%; flex: 1 1 auto; }
  /* Mobile side panel behavior */
  .left-panel {
    position: fixed;
    top: 56px; /* below topbar */
    left: 0;
    height: calc(100vh - 56px);
    width: 85vw;
    max-width: none;
    background: #ffffff;
    z-index: 1001;
    overflow: auto;
    border-right: 1px solid #eee;
    box-shadow: 4px 0 22px rgba(0,0,0,.12);
    transform: translateX(-110%);
    transition: transform .25s ease;
  }
  .left-panel.open { transform: translateX(0); }
}

.side-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.2); backdrop-filter: blur(1px); z-index: 1000; }
.side-overlay.show { display: block; }

.card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border: 1px solid #eee;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; font-size: 16px; color: #374151; }
.card .row { display: flex; gap: 8px; }
.card input[type="text"], .card input[type="number"] { width: 100%; padding: 9px 10px; border-radius: 9px; border: 1px solid #ddd; }
.help { color: #6b7280; font-size: 12px; }
.error { color: #b91c1c; font-size: 13px; margin-top: 6px; display: none; }

.cat-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; border: 0; cursor: pointer;
  background: #f3f4f6; color: #111827; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.cat-btn .icon { font-size: 18px; }
.cat-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.1); }
.cat-btn.active { background: #a4b5e9; border: 1px solid #a8abb3; box-shadow: 0 8px 18px rgba(99,102,241,0.2); }

.badge { display:inline-block; padding:4px 8px; border-radius: 999px; font-size: 12px; }
.badge.silver { background:#e5e7eb; color:#111827; }
.badge.gold { background:#fef3c7; color:#92400e; }
.badge.premium { background:#ede9fe; color:#4c1d95; }
.badge.prestigious { background:#fce7f3; color:#831843; }
.badge.platinum { background:#e0e7ff; color:#3730a3; }
.badge.diamond { background:#fef3c7; color:#78350f; border: 2px solid #fbbf24; }

#smoothDisplay {
  text-align: center;
  font-size: 25px;
  font-weight: 750;
  margin: 14px auto 10px;
  min-height: 28px;
}
.wheel-container {
  position: relative;
  width: 420px;
  height: 420px;
  margin: 12px auto 8px;
}
canvas#smoothWheel {
  display: block;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 8px solid #333;
  background: #fff;
  box-sizing: border-box;
  margin: 0 auto;
  /* z-index: 99999; */
}
.pointer {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 28px solid #e74c3c;
  z-index: 20;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.controls { text-align: center; margin: 10px 0 22px; }

/* Spin button: nicer, bolder */
#smoothSpinBtn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-size: 25px; font-weight: 800; letter-spacing: .3px;
  border-radius: 15px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #000000, #202020);
  color: #fff;
  border: 3px solid #cb4141;
  box-shadow: 0 10px 24px rgba(59,130,246,.35);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
}
#smoothSpinBtn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(59,130,246,.45); filter: brightness(1.03); }
#smoothSpinBtn:active { transform: translateY(0); filter: brightness(.98); }
#smoothSpinBtn:disabled { opacity: .7; cursor: not-allowed; }
#smoothSpinBtn .spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.6); border-top-color: #fff;
  border-radius: 50%; animation: btnspin .8s linear infinite;
}
@keyframes btnspin { to { transform: rotate(360deg); } }

/* Category list styling */
#categoryList { list-style: none; margin: 0; padding: 0; }
#categoryList li {
  display: flex; align-items: center; gap: 10px;
  background: #f9fafb; border: 1px solid #eef2f7; color: #374151;
  padding: 8px 10px; border-radius: 10px; margin: 6px 8px 6px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  transition: background .2s ease, transform .08s ease, box-shadow .2s ease;
}
#categoryList li::before {
  content: '\2714'; /* checkmark */
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: #10b981; color: #fff; font-size: 12px;
}
#categoryList li:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }

