:root {
  color-scheme: dark;
  --bg: #071018;
  --surface: rgba(12, 21, 32, 0.78);
  --surface-strong: rgba(16, 28, 42, 0.94);
  --text: #f7fbff;
  --muted: #aebdca;
  --gold: #ffd36a;
  --gold-deep: #d89422;
  --cyan: #66e6ff;
  --danger: #ff7575;
  --line: rgba(151, 210, 255, 0.2);
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.46);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 14%, rgba(102, 230, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 5%, rgba(255, 211, 106, 0.2), transparent 24rem),
    linear-gradient(135deg, #050b12 0%, #0a1420 46%, #161021 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
  content: "";
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}


.hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}


.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.panel::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%);
  content: "";
  pointer-events: none;
}

.settings-entry {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(102, 230, 255, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.075);
  color: var(--muted);
  backdrop-filter: blur(20px);
  transition: transform 0.4s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  align-self: center;
  flex-shrink: 0;
}

.settings-entry:hover {
  transform: rotate(90deg);
  color: var(--cyan);
  border-color: rgba(102, 230, 255, 0.6);
  background: rgba(102, 230, 255, 0.12);
}

.settings-entry svg {
  display: block;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(540px, 1.18fr) minmax(320px, 0.82fr);
  gap: 22px;
  align-items: stretch;
}

.panel {
  padding: 24px;
}

.wheel-panel {
  min-height: 720px;
}

.records-panel {
  min-height: 300px;
}

.records-panel {
  grid-column: 2;
  display: flex;
  min-height: 720px;
  flex-direction: column;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
}

.live-badge {
  border: 1px solid rgba(102, 230, 255, 0.34);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(102, 230, 255, 0.1);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wheel-stage {
  position: relative;
  display: grid;
  width: min(560px, 100%);
  --label-radius: clamp(130px, 31vw, 184px);
  aspect-ratio: 1;
  margin: 24px auto 28px;
  place-items: center;
  isolation: isolate;
}

.wheel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 12px solid rgba(255, 238, 190, 0.95);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.25),
    inset 0 0 24px rgba(0, 0, 0, 0.5),
    0 34px 90px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(246, 200, 95, 0.25);
  transition: transform 4.5s cubic-bezier(0.0, 0.7, 0.1, 1);
}

.wheel::after {
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: calc(var(--label-radius) * 1.05);
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  transform-origin: 0 0;
  transform: rotate(calc(var(--angle) - 90deg)) translate(calc(var(--label-radius) * 0.42), -50%);
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.wheel-label b,
.wheel-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-label b {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: clamp(0.58rem, 1.1vw, 0.72rem);
  line-height: 1.2;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  max-width: 55%;
}

.wheel-label small {
  font-size: clamp(0.68rem, 1.3vw, 0.88rem);
  font-weight: 800;
  line-height: 1.2;
  flex-shrink: 1;
}

.wheel-empty {
  display: grid;
  height: 100%;
  padding: 20px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.pointer {
  position: absolute;
  z-index: 4;
  top: -2px;
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-left: 18px solid transparent;
  border-top: 42px solid #ffde82;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 211, 106, 0.8));
}

.wheel-center {
  z-index: 3;
  display: grid;
  width: 120px;
  height: 120px;
  border: 10px solid rgba(255, 246, 220, 0.9);
  border-radius: 50%;
  place-items: center;
  background: linear-gradient(145deg, #fff5c4, #f0b743 46%, #a35d0d);
  color: #1d1308;
  font-weight: 900;
  letter-spacing: 0.18em;
  box-shadow: 
    0 18px 45px rgba(0, 0, 0, 0.5),
    inset 0 4px 10px rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.draw-actions {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.muted,
.empty-state {
  color: var(--muted);
  line-height: 1.7;
}
