/* ZakaStrike PHP — 前端样式(自包含，不依赖任何构建工具) */

:root {
  --bg: #05070c;
  --panel: rgba(14, 20, 32, 0.72);
  --line: rgba(80, 200, 255, 0.14);
  --cyan: #38f8ff;
  --rose: #ff2e63;
  --amber: #ffb020;
  --green: #22e58a;
  --violet: #8b7bff;
  --txt: #c9d6e8;
  --dim: #6b7d95;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 14px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(56,248,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,248,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 420px at 12% -8%, rgba(56,248,255,.10), transparent 60%),
    radial-gradient(620px 380px at 92% 4%, rgba(255,46,99,.09), transparent 62%),
    radial-gradient(900px 600px at 50% 120%, rgba(139,123,255,.08), transparent 65%);
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(90,130,170,.28); border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56,248,255,.4); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.num { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--dim); }
.cyan { color: var(--cyan); } .green { color: var(--green); } .rose { color: var(--rose); }
.amber { color: var(--amber); } .violet { color: var(--violet); }
.small { font-size: 11.5px; } .tiny { font-size: 10.5px; }
.bold { font-weight: 600; }
.center { text-align: center; } .right { text-align: right; }
.hide-sm { display: initial; }

/* ---------- 面板 ---------- */
.panel {
  position: relative; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -18px rgba(0,0,0,.9);
}
.panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.panel-bd { padding: 16px; }
.panel-hd h3 { margin: 0; font-size: 14px; font-weight: 600; color: #e6f0ff; }

/* ---------- 按钮 / 输入 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 500;
  transition: all .15s; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(24,32,47,.7); color: var(--txt);
  font-family: inherit;
}
.btn:hover { border-color: rgba(56,248,255,.42); color: #fff; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, rgba(56,248,255,.18), rgba(56,248,255,.06)); border-color: rgba(56,248,255,.45); color: #b9fbff; }
.btn-primary:hover { box-shadow: 0 0 22px -4px rgba(56,248,255,.55); }
.btn-danger { background: linear-gradient(135deg, rgba(255,46,99,.18), rgba(255,46,99,.05)); border-color: rgba(255,46,99,.45); color: #ffc0d1; }
.btn-danger:hover { box-shadow: 0 0 22px -4px rgba(255,46,99,.55); }
.btn-sm { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }
.btn-block { width: 100%; padding: 10px 14px; }

.inp, select.inp, textarea.inp {
  width: 100%; border-radius: 8px; padding: 8px 12px; font-size: 13px; outline: none;
  background: rgba(6,10,18,.86); border: 1px solid var(--line); color: #e6f0ff;
  transition: all .15s; font-family: inherit;
}
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #4c5b70 50%), linear-gradient(135deg, #4c5b70 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.inp:focus { border-color: rgba(56,248,255,.55); box-shadow: 0 0 0 3px rgba(56,248,255,.10); }
.inp::placeholder { color: #4c5b70; }
label.fld { display: block; margin-bottom: 12px; }
label.fld > span { display: block; font-size: 11.5px; color: var(--dim); margin-bottom: 5px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: #38f8ff; }

.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 500; border: 1px solid var(--line); }
.tag-on { background: rgba(34,229,138,.12); border-color: rgba(34,229,138,.35); color: var(--green); }
.tag-off { background: rgba(107,125,149,.12); color: var(--dim); }
.tag-run { background: rgba(255,46,99,.12); border-color: rgba(255,46,99,.35); color: var(--rose); }
.tag-warn { background: rgba(255,176,32,.12); border-color: rgba(255,176,32,.35); color: var(--amber); }
.tag-info { background: rgba(56,248,255,.1); border-color: rgba(56,248,255,.3); color: var(--cyan); }
.kbd { border-radius: 4px; padding: 1px 6px; font-size: 11px; background: rgba(56,248,255,.10); color: var(--cyan); font-family: ui-monospace, monospace; }

/* ---------- 指示灯 ---------- */
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; animation: pulse 1.8s ease-in-out infinite; }
.dot-on { background: var(--green); box-shadow: 0 0 9px var(--green); }
.dot-off { background: #45566b; animation: none; }
.dot-run { background: var(--rose); box-shadow: 0 0 9px var(--rose); }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.rise { animation: rise .34s cubic-bezier(.22,1,.36,1) both; }
.scan-line { position: relative; overflow: hidden; }
.scan-line::before {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56,248,255,.75), transparent);
  animation: scan 2.6s linear infinite;
}
@keyframes scan { 0% { top: -2%; opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { top: 102%; opacity: 0; } }
.bar-track { height: 5px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.22,1,.36,1); }

/* ---------- 布局 ---------- */
.app { position: relative; z-index: 10; min-height: 100%; display: flex; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 232px; flex-shrink: 0;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  background: rgba(8,11,19,.94); backdrop-filter: blur(14px); z-index: 40;
  transition: transform .2s;
}
.sidebar .brand { padding: 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.logo-badge {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(56,248,255,.22), rgba(255,46,99,.16));
  border: 1px solid rgba(56,248,255,.35);
}
.sidebar nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group { padding: 0 8px 8px; font-size: 10.5px; letter-spacing: 1.5px; color: var(--dim); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: #8b9cb3; transition: all .15s; border: 1px solid transparent; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(56,248,255,.06); color: #d6e6f7; text-decoration: none; }
.nav-on { background: linear-gradient(90deg, rgba(56,248,255,.14), rgba(56,248,255,.03)); border-color: rgba(56,248,255,.3); color: #b9fbff !important; }
.sidebar .foot { padding: 12px; border-top: 1px solid var(--line); font-size: 11.5px; }
.sidebar .foot .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.main { flex: 1; min-width: 0; margin-left: 232px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: rgba(6,9,16,.86); backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip { display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 6px 12px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; }
.content { padding: 16px; max-width: 1500px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 14px; }
.stack > * + * { margin-top: 12px; }

.stat { padding: 14px 16px; }
.stat .k { font-size: 11.5px; color: var(--dim); margin-bottom: 6px; }
.stat .v { font-size: 21px; font-weight: 700; color: #fff; }
.stat .s { font-size: 11px; color: var(--dim); margin-top: 3px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; padding: 9px 12px; color: var(--dim); font-weight: 500; font-size: 11.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid rgba(80,200,255,.07); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(56,248,255,.03); }
.scroll-x { overflow-x: auto; }

.alert { border-radius: 10px; padding: 10px 14px; font-size: 12.5px; border: 1px solid; }
.alert-err { background: rgba(255,46,99,.1); border-color: rgba(255,46,99,.3); color: #ffc0d1; }
.alert-ok { background: rgba(34,229,138,.1); border-color: rgba(34,229,138,.3); color: #a8f5d0; }
.alert-warn { background: rgba(255,176,32,.1); border-color: rgba(255,176,32,.3); color: #ffe0a8; }
.alert-info { background: rgba(56,248,255,.08); border-color: rgba(56,248,255,.28); color: #b9fbff; }

.progress { height: 5px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); border-radius: 4px; }

/* ---------- 滑块 ---------- */
input[type=range] { -webkit-appearance: none; width: 100%; height: 5px; border-radius: 4px; background: rgba(255,255,255,.1); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(56,248,255,.7); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--cyan); cursor: pointer; }

/* ---------- 登录/注册页 ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 18px; position: relative; z-index: 10; }
.auth-box { width: 100%; max-width: 420px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-logo { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(56,248,255,.2), rgba(255,46,99,.14)); border: 1px solid rgba(56,248,255,.35); }
.auth-head h1 { margin: 0; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.4px; }
.auth-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--dim); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; background: rgba(6,10,18,.8); padding: 4px; border-radius: 10px; border: 1px solid var(--line); }
.tabs a { flex: 1; text-align: center; padding: 7px; border-radius: 7px; font-size: 13px; color: var(--dim); }
.tabs a.on { background: rgba(56,248,255,.12); color: #b9fbff; }
.tabs a:hover { text-decoration: none; }

/* ---------- 安装向导 ---------- */
.wiz { max-width: 780px; margin: 0 auto; padding: 32px 18px 60px; position: relative; z-index: 10; }
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 11px; border: 1px solid var(--line); background: rgba(10,16,26,.9); }
.step.on { color: #b9fbff; } .step.on i { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px -2px rgba(56,248,255,.6); }
.step.done i { border-color: rgba(34,229,138,.5); color: var(--green); }
.step-sep { flex: 1; min-width: 12px; height: 1px; background: var(--line); }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(80,200,255,.08); font-size: 13px; }
.kv:last-child { border-bottom: none; }

/* ---------- 移动端 ---------- */
.burger { display: none; }
@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .burger { display: inline-flex; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0,1fr); }
  .hide-sm { display: none !important; }
  .panel { border-radius: 10px; }
  .content { padding: 12px; }
}
