:root {
  --bg: #0e0a1a; --bg2: #160f29; --panel: #1c1433; --panel2: #241a42; --line: #33275a;
  --text: #ece8f7; --muted: #a59cc4; --gold: #f2c14e; --violet: #9b5cff; --violet2: #7a2bd1;
  --green: #3ddc97; --red: #ff5d73; --blue: #4fa8ff;
  --radius: 14px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .serif { font-family: 'Cinzel', Georgia, serif; letter-spacing: .02em; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .9em; }
img { max-width: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .65em 1.15em; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: transform .12s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--violet); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--violet), var(--violet2)); border-color: transparent; color: #fff; }
.btn.gold { background: linear-gradient(135deg, #ffd56b, #e2a52a); border-color: transparent; color: #241500; }
.btn.twitch { background: #9146ff; border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: .4em .75em; font-size: .87em; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2em; }
.muted { color: var(--muted); }
.small { font-size: .86em; }
.row { display: flex; gap: .8em; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 1em; }
.tag { display: inline-block; padding: .15em .6em; border-radius: 99em; font-size: .78em; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); }
.tag.free { color: var(--muted); } .tag.pro { color: var(--blue); border-color: #2b5c8f; } .tag.premium { color: var(--gold); border-color: #7c5f1d; }
.tag.ok { color: var(--green); } .tag.bad { color: var(--red); } .tag.warn { color: var(--gold); }

label { display: block; font-size: .85em; color: var(--muted); margin-bottom: .3em; font-weight: 600; }
input, select, textarea { width: 100%; padding: .6em .75em; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: -1px; border-color: transparent; }
input[type=color] { padding: 2px; height: 2.4em; cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: var(--violet); transform: scale(1.15); }
input[type=range] { padding: 0; accent-color: var(--violet); }
textarea { resize: vertical; min-height: 4.5em; }
.field { margin-bottom: .9em; }
.check { display: flex; align-items: center; gap: .55em; color: var(--text); font-weight: 500; font-size: .95em; cursor: pointer; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .6em .7em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .8em; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.table-wrap { overflow-x: auto; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150%); background: var(--panel2); border: 1px solid var(--violet); padding: .8em 1.2em; border-radius: 12px; box-shadow: var(--shadow); z-index: 1000; transition: transform .3s; max-width: calc(100vw - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--red); }

.modal-bg { position: fixed; inset: 0; background: rgba(5, 3, 12, .75); display: grid; place-items: center; z-index: 900; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.4em; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.copy { display: flex; gap: .5em; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: .85em; }

@media (max-width: 700px) { body { font-size: 14px; } }

.site-banner { display: flex; gap: .8em; align-items: center; justify-content: center; flex-wrap: wrap; padding: .55em 2.6em .55em 1em; background: linear-gradient(90deg, #7a2bd1, #c0399b); color: #fff; font-weight: 600; text-align: center; position: relative; }
.site-banner a { color: #ffe39a; text-decoration: underline; }
.site-banner button { position: absolute; right: .6em; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 1.1em; cursor: pointer; }
.strike { text-decoration: line-through; color: var(--muted); font-weight: 600; font-size: .55em; margin-right: .3em; }
.promo-pill { display: inline-block; background: rgba(61,220,151,.12); color: var(--green); border: 1px solid rgba(61,220,151,.4); border-radius: 99em; padding: .15em .6em; font-size: .78em; font-weight: 700; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 99em; padding: 3px; }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; padding: .4em 1em; border-radius: 99em; cursor: pointer; }
.seg button.on { background: var(--violet2); color: #fff; }
