:root { --bg: #0b0d08; --panel: #13170e; --panel2: #1a2013; --line: #263020; --text: #eef5e6; --muted: #8f9c80; --lime: #a8ff1a; --lime2: #c8ff5a; --red: #ff3b5c; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
button { cursor: pointer; font-weight: 600; }
button:hover { border-color: var(--lime); }
button.primary { background: var(--lime); color: #0b1205; border-color: var(--lime); }
button.primary:hover { background: var(--lime2); }
button.ghost { background: transparent; }
input:focus, textarea:focus { outline: 2px solid var(--lime); outline-offset: -1px; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 22px; padding: 0 22px; height: 58px; background: rgba(11,13,8,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .5px; }
.logo span { color: var(--lime); }
.top nav a { color: var(--muted); font-weight: 600; } .top nav a:hover { color: var(--text); }
.spacer { flex: 1; }
#authBox { display: flex; gap: 10px; align-items: center; }
main { max-width: 1400px; margin: 0 auto; padding: 24px 22px 60px; }
h1 { font-family: 'Chakra Petch', sans-serif; font-size: 28px; margin: 0 0 16px; }
h2 { font-family: 'Chakra Petch', sans-serif; font-size: 20px; margin: 28px 0 12px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .12s, border-color .12s; }
.card:hover { transform: translateY(-3px); border-color: var(--lime); }
.thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #1d2614, #0d1009); position: relative; display: grid; place-items: center; }
.thumb .big { font-family: 'Chakra Petch'; font-size: 54px; font-weight: 700; color: rgba(168,255,26,.25); }
.badge-live { position: absolute; left: 10px; top: 10px; background: var(--red); color: #fff; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 4px; letter-spacing: 1px; }
.badge-viewers { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.7); font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.meta { display: flex; gap: 10px; padding: 12px; }
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #0b1205; }
.meta .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .n { color: var(--muted); font-size: 13px; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; }
/* channel */
.channel { display: grid; grid-template-columns: 1fr 340px; gap: 18px; }
.player { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); background: radial-gradient(circle at 50% 40%, #1a2112, #050604); }
.player .off b { display: block; font-family: 'Chakra Petch'; font-size: 26px; color: var(--text); }
.chead { display: flex; align-items: center; gap: 14px; margin: 14px 0; flex-wrap: wrap; }
.chead .av { width: 56px; height: 56px; font-size: 22px; }
.chead .info { flex: 1; min-width: 200px; }
.chead .title { font-size: 19px; font-weight: 700; }
.chead .sub { color: var(--muted); font-size: 14px; }
.livepill { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-left: 6px; }
.tip { background: #ffd21a; color: #221a00; border-color: #ffd21a; }
.chat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; height: calc(100vh - 110px); max-height: 760px; position: sticky; top: 80px; }
.chat .hd { padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-family: 'Chakra Petch'; letter-spacing: 1px; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.chat .msgs .m b { margin-right: 6px; }
.chat .msgs .m .host { background: var(--lime); color: #0b1205; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-right: 5px; font-weight: 700; }
.chat .msgs .sys { color: var(--muted); font-style: italic; }
.chat .msgs .ev { color: var(--lime); font-weight: 600; }
.chat form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat form input { flex: 1; min-width: 0; }
/* dashboard */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.row label { width: 130px; color: var(--muted); }
.row input, .row textarea { flex: 1; min-width: 220px; }
.key { font-family: Consolas, monospace; letter-spacing: 1px; }
.steps { line-height: 1.9; }
.steps code { background: var(--panel2); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); }
.auth { max-width: 420px; margin: 40px auto; }
.auth input { width: 100%; margin: 6px 0 12px; }
.err { color: var(--red); min-height: 20px; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 90px); background: var(--panel2); border: 1px solid var(--lime); padding: 10px 18px; border-radius: 10px; transition: transform .2s; z-index: 50; }
#toast.show { transform: translate(-50%, 0); }
@media (max-width: 900px) { .channel { grid-template-columns: 1fr; } .chat { height: 420px; position: static; } .row label { width: 100%; } }
#verifyBar { background: #2a2408; border-bottom: 1px solid #5c4d0a; color: #ffe27a; text-align: center; padding: 9px 16px; font-weight: 600; }
#verifyBar a { color: var(--lime); margin-left: 6px; }
details summary { margin: 8px 0; }

/* ---------- v2: nav, search, menus ---------- */
.top nav { display: flex; gap: 18px; }
.search { flex: 0 1 380px; }
.search input { width: 100%; background: var(--panel); border-radius: 20px; padding: 8px 16px; }
.bellwrap { position: relative; }
.avbtn { padding: 2px; border-radius: 50%; }
#bell { position: relative; font-size: 17px; }
#bell .dot { position: absolute; top: -4px; right: -6px; background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 5px; }
.menu { display: none; position: absolute; right: 0; top: 46px; width: 300px; max-height: 420px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.6); z-index: 30; padding: 6px; }
.menu.open { display: block; }
.menu a { display: block; padding: 9px 12px; border-radius: 8px; }
.menu a:hover { background: var(--panel2); }
.menu a.unread { background: rgba(168,255,26,.07); }
.menu a small { display: block; color: var(--muted); font-size: 12px; }
.menu .mh { padding: 8px 12px; font-weight: 700; font-family: 'Chakra Petch'; }
img.av { border-radius: 50%; object-fit: cover; flex: none; display: block; }
.livepill, .staff, .sus { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.staff { background: var(--lime); color: #0b1205; }
.sus { background: #555; color: #fff; }
.more { font-size: 14px; color: var(--lime); font-family: Inter; font-weight: 600; margin-left: 10px; }
/* ---------- cards ---------- */
.thumb { background-size: cover; background-position: center; }
.badge-clip { position: absolute; right: 10px; top: 10px; background: var(--lime); color: #0b1205; font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.badge-viewers { right: auto; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card.small .meta { padding: 14px; align-items: center; }
/* ---------- channel ---------- */
.banner { height: 220px; border-radius: 14px; background: linear-gradient(120deg, #1d2a10, #0d1209 60%, #22301a); background-size: cover; background-position: center; border: 1px solid var(--line); }
.banner.small { height: 140px; margin-bottom: 10px; }
.chead { margin-top: -38px; padding: 0 18px; align-items: flex-end; }
.chead .av { border: 4px solid var(--bg); }
.cname { font-family: 'Chakra Petch'; font-size: 26px; font-weight: 700; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 14px 0 18px; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--text); border-bottom-color: var(--lime); }
.title { font-size: 19px; font-weight: 700; }
.about .links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.about .links a { background: var(--panel2); border: 1px solid var(--line); padding: 7px 12px; border-radius: 8px; }
.about .links a:hover { border-color: var(--lime); }
.vpage { max-width: 1100px; }
.vpage video { width: 100%; height: 100%; background: #000; }
/* ---------- chat + mod tools ---------- */
.chat .msgs .m { position: relative; padding: 2px 4px; border-radius: 6px; }
.chat .msgs .m:hover { background: var(--panel2); }
.chat .msgs .m .tools { display: none; position: absolute; right: 2px; top: 0; background: var(--panel2); border-radius: 6px; }
.chat .msgs .m:hover .tools { display: flex; }
.chat .msgs .m .tools button { padding: 2px 6px; font-size: 12px; background: none; border: 0; }
.chat .msgs .m.gone .txt { color: var(--muted); font-style: italic; }
.badge { font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-right: 5px; font-weight: 700; }
.b-host { background: var(--lime); color: #0b1205; } .b-mod { background: #3fa9ff; color: #001a33; } .b-staff { background: #ff3ca6; color: #fff; }
.chat .msgs .m b { margin-right: 6px; }
/* ---------- forms, modal, misc ---------- */
.code { letter-spacing: 4px; font-size: 20px; text-align: center; max-width: 220px; }
label.radio { display: flex; gap: 8px; align-items: center; margin: 6px 0; cursor: pointer; color: var(--text) !important; width: auto !important; }
.auth label.radio { font-size: 14px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal .panel { width: 440px; max-width: 100%; }
.warnbox { border: 1px solid #806a10; background: #2a2408; color: #ffe27a; padding: 10px 14px; border-radius: 8px; margin: 8px 0; }
.warnbox a { color: var(--lime); }
.chip { display: inline-block; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; margin: 2px 4px 2px 0; }
.chip a { color: var(--red); margin-left: 4px; }
.devrow { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.panel.danger { border-color: #5a1a24; }
.dangerbtn { background: var(--red); color: #fff; border-color: var(--red); }
.qr { border-radius: 10px; background: #fff; padding: 6px; width: 200px; }
.statrow { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; color: var(--muted); }
.stat b { display: block; font-size: 26px; color: var(--text); }
.report.urgent { border-color: var(--red); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.legal h2 { font-size: 18px; } .legal li { margin: 4px 0; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; border-top: 1px solid var(--line); }
footer a:hover { color: var(--lime); }
@media (max-width: 900px) { .search { display: none; } .top nav { gap: 10px; } .banner { height: 130px; } }
/* fix: the 13+/terms checkbox was stretched to full width by ".auth input" and squashed its text */
.auth input[type=checkbox], label.radio input[type=checkbox], label.radio input[type=radio] { width: 20px !important; height: 20px; min-width: 20px; margin: 0; flex: none; accent-color: var(--lime); }
.auth label.radio { align-items: flex-start; line-height: 1.4; margin: 4px 0 12px; }
/* 👁 show-password button */
.pwwrap { position: relative; display: flex; flex: 1; min-width: 220px; }
.auth .pwwrap { display: flex; width: 100%; margin: 6px 0 12px; }
.pwwrap input { flex: 1; width: 100%; padding-right: 44px !important; margin: 0 !important; }
.pwwrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; padding: 4px 8px; font-size: 17px; cursor: pointer; line-height: 1; }
.pwwrap .eye:hover { background: var(--panel); border-radius: 6px; }
