:root {
  color-scheme: dark;
  --bg: #0b0b10; --card: #17171f; --card-2: #1f1f2a; --line: #2a2a38;
  --text: #f1f1f5; --muted: #a9a9bb; --soft: #d6d6e0;
  --gold: #e5a00d; --gold-2: #ffcf5c; --glow: rgba(229, 160, 13, 0.25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; padding: 0 16px 32px;
  background:
    radial-gradient(1000px 480px at 50% -12%, rgba(229, 160, 13, 0.25), transparent 70%),
    radial-gradient(700px 400px at 100% 40%, rgba(178, 107, 255, 0.10), transparent 70%),
    var(--bg);
  color: var(--text); font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--gold-2); }
strong { color: var(--text); }

.top { max-width: 720px; margin: 0 auto; padding: 44px 0 26px; text-align: center; }
.logo {
  width: 64px; height: 64px; margin: 0 auto 10px; display: grid; place-items: center; font-size: 2rem;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px var(--glow);
}
.top h1 {
  margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro { margin: 0 auto; max-width: 560px; color: var(--soft); font-size: 1.05rem; }

.layout { max-width: 1100px; margin: 0 auto; display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 400px 1fr; gap: 24px; }
  .signin { position: sticky; top: 20px; }
  .jump { display: none !important; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.eyebrow { margin: 0 0 2px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2); }
.card h2 { margin: 0 0 6px; font-size: 1.5rem; }
.muted { margin: 0 0 18px; color: var(--muted); }

.signin { border-color: rgba(229, 160, 13, 0.4); background: linear-gradient(180deg, rgba(229, 160, 13, 0.08), transparent 40%), var(--card); }
.plex-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 16px; border: 0; border-radius: 14px; cursor: pointer;
  font-weight: 800; font-size: 1.12rem; color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 12px 30px var(--glow); transition: transform 0.15s ease, filter 0.15s ease;
}
.plex-btn .chev { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: #111; color: var(--gold-2); font-size: 1.2rem; line-height: 1; }
.plex-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.plex-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.msg { min-height: 0; margin: 12px 0 0; text-align: center; color: var(--soft); font-size: 0.95rem; }
.msg:empty { display: none; }
.msg.ok { color: #6ee7b7; }
.msg.err {
  color: #fecaca; text-align: left; padding: 10px 12px; border-radius: 10px;
  background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4);
}

.mini-steps { list-style: none; counter-reset: n; margin: 20px 0 0; padding: 0; }
.mini-steps li { counter-increment: n; position: relative; padding-left: 32px; margin-bottom: 10px; color: var(--soft); font-size: 0.95rem; }
.mini-steps li::before {
  content: counter(n); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #111; background: var(--gold-2);
}

.trouble { margin-top: 14px; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; }
.trouble summary { padding: 12px 14px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.trouble summary::-webkit-details-marker { display: none; }
.trouble summary::after { content: "+"; color: var(--gold-2); font-weight: 900; }
.trouble[open] summary::after { content: "−"; }
.trouble ul { margin: 0; padding: 0 14px 14px 30px; color: var(--soft); font-size: 0.93rem; }
.trouble li { margin-bottom: 10px; }

.jump {
  display: block; margin-top: 16px; padding: 12px; text-align: center; border-radius: 12px; text-decoration: none; font-weight: 700;
  border: 1px dashed rgba(229, 160, 13, 0.5); color: var(--gold-2);
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps > li {
  counter-increment: s; position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 14px;
  padding: 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line);
}
.steps .icon {
  position: relative; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(229, 160, 13, 0.25), rgba(178, 107, 255, 0.18)); border: 1px solid rgba(255, 255, 255, 0.08);
}
.steps .icon::after {
  content: counter(s); position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 900; color: #111; background: var(--gold-2);
  box-shadow: 0 0 0 3px var(--card-2);
}
.steps h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.steps p { margin: 0 0 8px; color: var(--soft); }
.steps .tip { font-size: 0.9rem; color: var(--muted); padding-left: 10px; border-left: 2px solid rgba(229, 160, 13, 0.5); }
.steps > li > div > :last-child { margin-bottom: 0; }
.devices { margin: 0 0 8px; padding-left: 18px; color: var(--soft); }
.devices li { margin-bottom: 4px; }
.link-btn {
  display: inline-block; margin: 2px 0 10px; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 800;
  background: #111; color: var(--gold-2); border: 1px solid rgba(229, 160, 13, 0.5);
}
.link-btn:hover { background: #1a1a1a; }

.foot { max-width: 1100px; margin: 26px auto 0; text-align: center; color: var(--muted); font-size: 0.9rem; }

button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }

@media (max-width: 520px) {
  .top { padding-top: 32px; }
  .card { padding: 22px 16px; border-radius: 18px; }
  .steps > li { grid-template-columns: 1fr; gap: 10px; }
  .steps .icon { width: 46px; height: 46px; font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .plex-btn { transition: none; } }
