/* Shared look of the public pages and the account page. */
:root {
  color-scheme: dark;
  --bg: #0b0b10; --panel: #121219; --panel2: #171720; --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.12);
  --accent: #8b5cf6; --accent2: #6d43e0; --glow: rgba(139,92,246,.35);
  --text: #f4f4fa; --soft: #b9b9cc; --muted: #7d7d94; --red: #f87171; --green: #4ade80; --amber: #fbbf24;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(139,92,246,.16), transparent 60%), radial-gradient(700px 420px at -10% 10%, rgba(56,97,251,.10), transparent 60%);
  background-attachment: fixed;
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 15px; line-height: 1.5;
}
.hidden { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }

/* brand mark */
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: white; background: linear-gradient(135deg, var(--accent), #4f46e5); box-shadow: 0 6px 22px var(--glow); }

/* inputs and buttons */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type="email"], input[type="password"], input[type="text"] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: #0e0e14; color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
button, a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px; border: none; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: white; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .15s, opacity .15s; box-shadow: 0 8px 24px rgba(109,67,224,.28); }
button:hover, a.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(109,67,224,.4); }
button.ghost, a.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--soft); box-shadow: none; }
button.ghost:hover { border-color: rgba(255,255,255,.25); color: var(--text); box-shadow: none; }
button.danger { background: transparent; border: 1px solid rgba(248,113,113,.5); color: var(--red); box-shadow: none; padding: 7px 12px; font-size: 12px; }
button.danger:hover { box-shadow: none; }
a.btn.off { opacity: .45; pointer-events: none; box-shadow: none; }
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--soft); }
label.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.msg { margin-top: 14px; font-size: 13px; min-height: 18px; color: var(--soft); }
.msg.err { color: var(--red); } .msg.ok { color: var(--green); }
.msg:empty { min-height: 0; margin: 0; }

/* signed-out view */
#auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.authcard { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.authcard h1 { font-size: 22px; margin-top: 22px; }
.authcard p { color: var(--muted); margin: 6px 0 8px; font-size: 14px; }
.authcard button { width: 100%; margin-top: 16px; }
.authcard .msg { min-height: 18px; margin-top: 14px; }
.row { display: flex; gap: 10px; }

/* signed-in shell */
header.top { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); background: rgba(11,11,16,.72); border-bottom: 1px solid var(--line); }
.topin { max-width: 1040px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav.tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 0 auto; }
nav.tabs button { background: transparent; box-shadow: none; color: var(--muted); padding: 8px 16px; border-radius: 10px; font-weight: 600; }
nav.tabs button:hover { transform: none; color: var(--text); box-shadow: none; }
nav.tabs button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: white; box-shadow: 0 6px 18px rgba(109,67,224,.35); }
.me { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.me button { padding: 8px 14px; }
main { max-width: 1040px; margin: 0 auto; padding: 34px 20px 80px; }
.hero h1 { font-size: 28px; font-weight: 750; }
.hero p { color: var(--muted); margin: 6px 0 26px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.card h2 { font-size: 16px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1.1fr 1fr; margin-top: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .7; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-size: 24px; font-weight: 750; margin-top: 8px; }
.stat .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.v.ok { color: var(--green); } .v.bad { color: var(--red); } .v.warn { color: var(--amber); }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #a78bfa); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(139,92,246,.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,.3); margin: 0 0 4px 6px; }
.pill.green { background: rgba(74,222,128,.1); color: var(--green); border-color: rgba(74,222,128,.3); }
.pill.gray { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--line2); }

.device { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.device:first-child { border-top: none; padding-top: 0; }
.device small { color: var(--muted); display: block; }
.empty { color: var(--muted); font-size: 14px; }

/* redeem */
.narrow { max-width: 560px; margin: 0 auto; }
.redeem input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.redeem button { width: 100%; margin-top: 14px; }
.lic { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lic:first-child { border-top: none; padding-top: 0; }
.lic small { color: var(--muted); }

/* download */
.dl { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(18,18,25,.9) 55%); border: 1px solid rgba(139,92,246,.28); }
.dl h2 { font-size: 20px; margin-bottom: 4px; }
.dl p { margin: 0; color: var(--soft); font-size: 14px; }
.dl .meta { color: var(--muted); font-size: 12px; margin-top: 8px; word-break: break-all; }
.steps { margin: 0; padding-left: 20px; color: var(--soft); font-size: 14px; line-height: 1.9; }
h2.section { font-size: 20px; margin: 38px 0 18px; }

/* changelog timeline */
.log { display: grid; grid-template-columns: 110px 1fr; gap: 0 22px; }
.log .when { text-align: right; padding-top: 22px; position: relative; }
.log .when b { display: block; font-size: 14px; font-weight: 750; }
.log .when span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin-top: 4px; }
.log .when::after { content: ""; position: absolute; right: -12px; top: 70px; bottom: -4px; border-right: 1px dashed var(--line2); }
.log .entry { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; margin-bottom: 26px; }
.log .entry h3 { font-size: 15px; font-weight: 750; margin-bottom: 10px; }
.log ul { margin: 0; padding-left: 26px; color: var(--soft); font-size: 14px; }
.log li { margin: 9px 0; }
.log li::marker { color: var(--muted); }
.log ul ul { margin-top: 4px; color: #a3a3b8; }
.log ul ul li { margin: 12px 0; }

@media (max-width: 860px) {
  .g4 { grid-template-columns: 1fr 1fr; } .g2 { grid-template-columns: 1fr; }
  nav.tabs { order: 3; width: 100%; } nav.tabs button { flex: 1; padding: 8px 6px; }
  .me { margin-left: auto; } .me span { display: none; }
  .log { grid-template-columns: 1fr; } .log .when { text-align: left; padding: 0 0 8px 4px; display: flex; gap: 10px; align-items: baseline; }
  .log .when::after { display: none; }
}

/* ---- additions: links as brand, public pages, status, settings ---- */
a.brand { color: var(--text); text-decoration: none; }
nav.links { display: flex; gap: 22px; margin: 0 auto; font-size: 14px; }
nav.links a { color: var(--muted); text-decoration: none; font-weight: 600; }
nav.links a:hover, nav.links a.on { color: var(--text); }
.me a.btn { padding: 8px 16px; }
main.wide { max-width: 1040px; }
main.narrowmain { max-width: 720px; }
section[id] { scroll-margin-top: 80px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.v.small { font-size: 17px; margin-top: 0; }

.landing-hero { text-align: center; padding: 56px 0 44px; }
.landing-hero h1 { font-size: clamp(32px, 6vw, 54px); font-weight: 800; line-height: 1.1; margin: 18px auto 0; max-width: 780px; background: linear-gradient(135deg, #fff 30%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-hero p { color: var(--soft); max-width: 640px; margin: 18px auto 0; font-size: 17px; }
.landing-hero .pill { margin: 0; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
a.btn.big { padding: 14px 26px; font-size: 15px; }
.herometa { color: var(--muted); font-size: 13px; margin-top: 22px; min-height: 20px; }

.feature h3 { font-size: 17px; }
.feature p { color: var(--soft); font-size: 14px; margin: 8px 0 14px; }
.tags .pill { margin: 0 6px 6px 0; }
.clip { padding: 10px; }
.clip video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; display: block; }
.cliptitle { font-size: 14px; font-weight: 600; padding: 10px 6px 4px; }
.contact { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.contact h3 { font-size: 17px; }
.contact p { color: var(--soft); margin: 6px 0 0; font-size: 14px; }
.contact .cta { margin-top: 0; }
footer.foot { max-width: 1040px; margin: 0 auto; padding: 26px 20px 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
footer.foot a { color: var(--muted); }

/* status page */
.overall { display: flex; align-items: center; gap: 18px; }
.overall h1 { font-size: 22px; }
.overall p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.overall.ok { border-color: rgba(74,222,128,.35); } .overall.warn { border-color: rgba(251,191,36,.4); } .overall.down { border-color: rgba(248,113,113,.45); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.overall .dot { width: 18px; height: 18px; }
.dot.ok, .state.ok .dot { background: var(--green); box-shadow: 0 0 14px rgba(74,222,128,.6); }
.dot.warn, .state.warn .dot { background: var(--amber); box-shadow: 0 0 14px rgba(251,191,36,.5); }
.dot.down, .state.down .dot { background: var(--red); box-shadow: 0 0 14px rgba(248,113,113,.6); }
.statusrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.statusrow:first-child { border-top: none; padding-top: 0; } .statusrow:last-child { padding-bottom: 0; }
.statusrow small { display: block; color: var(--muted); }
.state { display: flex; align-items: center; gap: 10px; color: var(--soft); text-align: right; }

/* account page extras */
.pw { position: relative; }
.pw input { padding-right: 74px; }
.authcard .pw button.eye, button.eye { position: absolute; right: 6px; top: 6px; width: auto; margin: 0; padding: 6px 10px; font-size: 12px; border-radius: 8px; }
button.eye:hover { transform: none; }
.rules { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.rules li::before { content: "○  "; }
.rules li.ok { color: var(--green); } .rules li.ok::before { content: "●  "; }
#inbox p { margin: 10px 0; color: var(--soft); }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.35); color: #fde68a; border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; font-size: 14px; }
.banner.bad { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.4); color: #fecaca; }
.banner button { padding: 8px 14px; }
.device .acts { display: flex; gap: 6px; flex: none; }
.device button.mini { background: transparent; border: 1px solid var(--line2); color: var(--soft); box-shadow: none; padding: 7px 12px; font-size: 12px; }
.setting { margin-bottom: 16px; }
.setting p.sub { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.setting button { margin-top: 16px; }
.setting .pw button.eye { margin: 0; }
.dangerzone { border-color: rgba(248,113,113,.3); }
button.danger.wide { padding: 12px 18px; font-size: 14px; }

@media (max-width: 860px) {
  .g3 { grid-template-columns: 1fr; }
  nav.links { order: 3; width: 100%; justify-content: center; }
  .landing-hero { padding: 34px 0 30px; }
}
