:root {
  color-scheme: dark;
  --bg: #0a111a;
  --panel: rgba(18, 26, 37, 0.78);
  --line: rgba(143, 168, 198, 0.16);
  --text: #f4f8ff;
  --muted: #95a5ba;
  --cyan: #38d7ff;
  --green: #37d67a;
  --yellow: #ffd84d;
  --red: #ff5d73;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 50% 20%, rgba(90,124,255,.14), transparent 28rem), linear-gradient(145deg,#090f18,#0b121d 52%,#091922);
  overflow-x: hidden;
}
button,a { -webkit-tap-highlight-color: transparent; }
.animated-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.grid { position:absolute; inset:-20%; background-image:linear-gradient(rgba(98,130,170,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(98,130,170,.075) 1px,transparent 1px); background-size:54px 54px; animation:gridMove 24s linear infinite; }
.aurora { position:absolute; width:34rem; height:34rem; border-radius:999px; filter:blur(64px); opacity:.18; animation:auroraFloat 13s ease-in-out infinite; }
.aurora-a { left:5%; top:18%; background:#4b6cff; }
.aurora-b { right:4%; bottom:8%; background:#ffcf4a; animation-delay:-5s; }
.signal { position:absolute; width:28rem; height:28rem; border:1px solid rgba(56,215,255,.11); border-radius:999px; animation:signalPulse 7s ease-in-out infinite; }
.signal-a { left:8%; top:20%; }
.signal-b { right:4%; top:48%; animation-delay:-2s; border-color:rgba(255,216,77,.1); }
.guide-shell { position:relative; z-index:1; width:min(100% - 28px,760px); margin:0 auto; padding:18px 0 56px; }
.topbar { min-height:64px; display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; padding:0 2px; }
.brand { display:inline-flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; font-weight:800; font-size:20px; }
.brand img { width:34px; height:34px; border-radius:12px; object-fit:cover; box-shadow:0 0 0 1px rgba(56,215,255,.25); }
.top-actions { display:flex; gap:8px; }
.icon-button { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:12px; background:rgba(19,29,42,.68); color:var(--cyan); text-decoration:none; cursor:pointer; }
.icon-button svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.status-panel,.install-panel,.site-system-panel { border:1px solid var(--line); border-radius:22px; background:linear-gradient(135deg,rgba(21,31,45,.92),rgba(14,21,31,.84)); box-shadow:var(--shadow); backdrop-filter:blur(18px); }
.status-panel { padding:28px; margin-bottom:18px; }
.status-head,.system-head { display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.status-check,.step-icon,.system-icon { width:46px; height:46px; flex:0 0 auto; display:grid; place-items:center; border-radius:50%; background:rgba(55,214,122,.12); color:var(--green); border:1px solid rgba(55,214,122,.35); font-weight:900; }
.system-icon { background:rgba(255,216,77,.1); color:var(--yellow); border-color:rgba(255,216,77,.28); }
.status-check svg,.step-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; stroke-linejoin:round; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:4px; font-size:clamp(24px,5vw,32px); line-height:1.08; }
h2 { margin-bottom:4px; font-size:22px; }
.status-head p,.step-card p,.help-card p,.system-head p,.system-note { margin-bottom:0; color:var(--muted); line-height:1.55; }
.stats-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.stat { min-height:78px; padding:14px; border-radius:12px; border:1px solid var(--line); background:rgba(255,255,255,.035); }
.stat span,.device-summary span,.renew-plan span { display:block; margin-bottom:8px; color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.stat strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:16px; }
.stat-blue { border-color:rgba(56,215,255,.28); background:rgba(56,215,255,.08); }
.stat-green { border-color:rgba(55,214,122,.28); background:rgba(55,214,122,.08); }
.stat-red { border-color:rgba(255,93,115,.26); background:rgba(255,93,115,.08); }
.stat-yellow { border-color:rgba(255,216,77,.26); background:rgba(255,216,77,.08); }
.site-menu { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
.site-menu-button { min-height:56px; display:inline-flex; align-items:center; justify-content:center; gap:10px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.04); color:var(--text); font-weight:900; cursor:pointer; transition:transform .22s ease,border-color .22s ease,background .22s ease; }
.site-menu-button:hover,.site-menu-button.is-active { transform:translateY(-1px); border-color:rgba(255,216,77,.44); background:rgba(255,216,77,.1); }
.site-menu-icon { width:28px; height:28px; display:grid; place-items:center; border-radius:10px; background:rgba(255,216,77,.14); color:var(--yellow); }
.site-system-panel { margin-bottom:28px; padding:24px; animation:panelRise .35s ease both; }
.site-system-panel[hidden] { display:none; }
.device-summary { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding:14px 16px; border:1px solid rgba(56,215,255,.22); border-radius:14px; background:rgba(56,215,255,.08); }
.device-summary span { margin-bottom:0; }
.device-summary strong { font-size:24px; color:var(--cyan); }
.device-list { display:grid; gap:10px; }
.device-item,.device-empty { padding:14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); color:var(--muted); }
.device-item { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.device-item strong { display:block; color:var(--text); font-size:14px; }
.device-item small { color:var(--muted); }
.device-badge { flex:0 0 auto; padding:6px 10px; border-radius:999px; background:rgba(55,214,122,.1); color:var(--green); font-size:11px; font-weight:900; }
.renew-plans { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0 14px; }
.renew-plan { min-height:92px; padding:16px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.035); color:var(--text); cursor:pointer; transition:transform .22s ease,border-color .22s ease,background .22s ease; }
.renew-plan:nth-child(3) { grid-column:1 / -1; }
.renew-plan:hover,.renew-plan.is-active { transform:translateY(-1px); border-color:rgba(255,216,77,.48); background:rgba(255,216,77,.09); }
.renew-plan span { margin-bottom:10px; text-align:center; }
.renew-plan strong { display:block; text-align:center; font-size:28px; }
.renew-submit { width:100%; margin-top:2px; }
.system-note { margin-top:12px; font-size:13px; text-align:center; }
.install-panel { padding:26px; }
.install-top { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.install-top h2 { margin-bottom:0; }
.platform-select { display:grid; grid-template-columns:repeat(4,auto); gap:6px; padding:4px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); }
.platform-select button { border:0; border-radius:10px; padding:8px 10px; background:transparent; color:var(--muted); font-weight:800; cursor:pointer; }
.platform-select button.is-active { color:#071018; background:var(--cyan); }
.app-strip { margin-bottom:14px; padding:14px 16px; border-radius:14px; border:1px solid rgba(56,215,255,.45); background:linear-gradient(90deg,rgba(56,215,255,.2),rgba(56,215,255,.06)); color:var(--cyan); font-weight:900; box-shadow:0 0 24px rgba(56,215,255,.12); }
.steps { display:grid; gap:12px; }
.step-card,.help-card { display:grid; grid-template-columns:auto 1fr; gap:16px; padding:20px; border-radius:16px; border:1px solid var(--line); background:rgba(255,255,255,.035); }
.step-card h3,.help-card h3 { margin-bottom:8px; font-size:18px; }
.button-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.download-link,.primary-action,.secondary-action { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border:0; border-radius:12px; background:rgba(56,215,255,.18); color:var(--cyan); font-weight:900; text-decoration:none; cursor:pointer; }
.primary-action { margin-top:14px; background:linear-gradient(135deg,var(--cyan),#62f0ff); color:#071018; box-shadow:0 10px 26px rgba(56,215,255,.18); }
.secondary-action { background:rgba(255,216,77,.12); color:var(--yellow); }
.help-card { grid-template-columns:1fr auto; align-items:center; margin-top:12px; }
.toast { position:fixed; left:50%; bottom:20px; z-index:4; max-width:min(92vw,420px); padding:13px 16px; border:1px solid rgba(56,215,255,.28); border-radius:14px; background:rgba(10,16,24,.92); color:var(--text); box-shadow:var(--shadow); opacity:0; transform:translate(-50%,20px); transition:opacity .2s ease,transform .2s ease; pointer-events:none; }
.toast.is-visible { opacity:1; transform:translate(-50%,0); }
@keyframes gridMove { from { transform:translate3d(0,0,0); } to { transform:translate3d(56px,56px,0); } }
@keyframes signalPulse { 0%,100% { transform:scale(.8); opacity:.1; } 50% { transform:scale(1.1); opacity:.22; } }
@keyframes auroraFloat { 0%,100% { transform:translate3d(0,0,0) scale(1); } 50% { transform:translate3d(42px,-28px,0) scale(1.08); } }
@keyframes panelRise { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:640px) {
  .guide-shell { width:min(100% - 20px,760px); padding-top:10px; }
  .status-panel,.install-panel,.site-system-panel { padding:18px; border-radius:18px; }
  .stats-grid,.renew-plans { grid-template-columns:1fr; }
  .renew-plan:nth-child(3) { grid-column:auto; }
  .install-top { align-items:stretch; flex-direction:column; }
  .platform-select { grid-template-columns:repeat(2,1fr); }
  .step-card,.help-card { grid-template-columns:1fr; }
  .help-card .secondary-action { width:100%; }
  .site-menu-button { min-height:52px; }
}
