:root {
  --bg: #0a0a12;
  --panel: rgba(22, 20, 37, .88);
  --panel-2: rgba(28, 26, 46, .92);
  --text: #f7f5ff;
  --muted: #aaa5c2;
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --line: rgba(255,255,255,.10);
  --danger: #ff7d96;
  --success: #89e2b2;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 50% -10%, #242040 0, var(--bg) 45%); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { padding: 24px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(1240px, 100%); margin: 0 auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; margin-bottom: 20px; }
.hero.compact { margin-bottom: 18px; }
.eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .22em; margin-bottom: 8px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(34px, 4vw, 60px); line-height: 1.02; letter-spacing: -.045em; }
h2 { font-size: 20px; letter-spacing: -.02em; }
.hero p, .section-head p, .login-card p { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.ghost-button { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.045); color: var(--text); padding: 11px 16px; border-radius: 13px; transition: .18s ease; }
.ghost-button:hover { background: rgba(255,255,255,.08); border-color: rgba(192,132,252,.45); }
.admin-link { text-decoration: none; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(440px, 1.3fr); gap: 20px; align-items: stretch; }
.options-panel { padding: 24px; min-height: 680px; display: flex; flex-direction: column; }
.wheel-panel { padding: 24px; display: flex; flex-direction: column; align-items: center; min-height: 680px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.option-count { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(139,92,246,.16); color: var(--accent-2); font-weight: 800; }
textarea { width: 100%; flex: 1; min-height: 420px; resize: vertical; border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: var(--text); background: rgba(5,5,10,.55); outline: none; line-height: 1.65; }
textarea:focus, .text-input:focus { border-color: rgba(192,132,252,.55); box-shadow: 0 0 0 3px rgba(139,92,246,.12); }
.toolbar { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.info-box { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.03); display: grid; gap: 5px; font-size: 13px; line-height: 1.5; }
.info-box strong { color: var(--text); }
.wheel-stage { position: relative; width: min(100%, 560px); aspect-ratio: 1; display: grid; place-items: center; margin-top: 2px; }
.wheel-wrap { width: 86%; aspect-ratio: 1; position: relative; transform: rotate(0deg); transition: transform 5.3s cubic-bezier(.14,.84,.21,1); will-change: transform; }
#wheelCanvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
.wheel-center { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: #100d1d; border: 5px solid #25203c; box-shadow: 0 8px 30px rgba(0,0,0,.38); font-size: 13px; font-weight: 900; letter-spacing: .14em; color: var(--text); pointer-events: none; }
.pointer { position: absolute; z-index: 5; top: -2px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 17px solid transparent; border-right: 17px solid transparent; border-top: 34px solid #fff; filter: drop-shadow(0 5px 12px rgba(0,0,0,.45)); }
.result { text-align: center; margin-top: 4px; }
.result-caption { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }
.result-value { margin-top: 6px; font-size: clamp(24px, 3vw, 42px); font-weight: 900; letter-spacing: -.04em; max-width: 620px; overflow-wrap: anywhere; }
.spin-button { width: min(100%, 320px); border: 0; color: #fff; padding: 15px 20px; border-radius: 15px; font-weight: 900; letter-spacing: .02em; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 16px 35px rgba(139,92,246,.28); margin-top: 17px; transition: .18s ease; }
.spin-button:hover { transform: translateY(-1px); box-shadow: 0 20px 40px rgba(139,92,246,.34); }
.spin-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.spin-button.small { width: auto; margin-top: 0; padding: 12px 18px; }
.probability-list { width: min(100%, 620px); display: grid; gap: 7px; margin-top: 17px; }
.prob-dot.c0{background:#7c3aed;}
.prob-dot.c1{background:#a855f7;}
.prob-dot.c2{background:#c026d3;}
.prob-dot.c3{background:#db2777;}
.prob-dot.c4{background:#e11d48;}
.prob-dot.c5{background:#f97316;}
.prob-dot.c6{background:#f59e0b;}
.prob-dot.c7{background:#84cc16;}
.prob-dot.c8{background:#10b981;}
.prob-dot.c9{background:#06b6d4;}
.prob-dot.c10{background:#3b82f6;}
.prob-dot.c11{background:#6366f1;}
.prob-item { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255,255,255,.03); border-radius: 10px; font-size: 13px; }
.prob-dot { width: 10px; height: 10px; border-radius: 3px; }
.prob-value { color: var(--muted); }
.hidden { display: none !important; }
.dashboard { display: grid; gap: 18px; }
.admin-card { padding: 24px; }
.login-panel { padding: 50px 24px; }
.login-card { max-width: 430px; margin: 0 auto; }
.login-card h2 { font-size: 28px; }
.text-input { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; color: var(--text); background: rgba(5,5,10,.55); outline: none; }
.login-card .text-input { margin-top: 18px; }
.field { display: grid; gap: 8px; margin-top: 14px; }
.field > span { color: var(--muted); font-size: 13px; }
.rules-total { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); color: var(--muted); }
.rules-total strong { color: var(--text); }
.rules-list { display: grid; gap: 10px; margin-top: 14px; }
.rule-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; align-items: center; }
.rule-row .percent-wrap { position: relative; }
.rule-row .percent-wrap::after { content: '%'; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.rule-row input[type="number"] { padding-right: 28px; }
.delete-btn { border: 1px solid rgba(255,125,150,.20); background: rgba(255,125,150,.06); color: #ff9eae; padding: 11px 12px; border-radius: 12px; }
.save-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.status-text { min-height: 20px; color: var(--success); font-size: 13px; }
.error-text { min-height: 20px; margin-top: 10px; color: var(--danger); font-size: 13px; }
@media (max-width: 980px) { .workspace { grid-template-columns: 1fr; } .options-panel, .wheel-panel { min-height: auto; } textarea { min-height: 300px; } }
@media (max-width: 620px) { body { padding: 12px; } .hero { padding: 22px; align-items: flex-start; flex-direction: column; } .hero h1 { font-size: 38px; } .wheel-panel, .options-panel, .admin-card { padding: 18px; } .rule-row { grid-template-columns: 1fr 118px auto; } .save-row { flex-direction: column; align-items: stretch; } .save-row > div:last-child { display: flex; gap: 8px; justify-content: flex-end; } }
