/* ─── LANWatch 共享主题 v1.0 ─── */
/* 深色主题 · 玻璃态卡片 · 统一设计语言 */

:root {
  --bg: #f4f6fb;
  --bg-2: #eaecf4;
  --surface: rgba(0,0,0,0.04);
  --surface-hover: rgba(0,0,0,0.07);
  --surface-solid: #ffffff;
  --border: rgba(0,0,0,0.09);
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dim: rgba(37,99,235,0.10);
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.10);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245,158,11,0.12);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.10);
  --purple: #7c3aed;
  --purple-dim: rgba(124,58,237,0.10);
  --shadow: 0 16px 48px rgba(0,0,0,0.08);
  --radius: 14px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0a0c14;
  --bg-2: #0f1220;
  --surface: rgba(255,255,255,0.05);
  --surface-hover: rgba(255,255,255,0.08);
  --surface-solid: #131624;
  --border: rgba(255,255,255,0.09);
  --text: #f0f2f8;
  --muted: #8890a8;
  --primary: #4f8ef7;
  --primary-dim: rgba(79,142,247,0.14);
  --green: #4ade80;
  --green-dim: rgba(74,222,128,0.12);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251,191,36,0.12);
  --red: #f87171;
  --red-dim: rgba(248,113,113,0.12);
  --purple: #a78bfa;
  --purple-dim: rgba(167,139,250,0.12);
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── Layout ─── */
.container { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10,12,20,0.80);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
[data-theme="light"] .nav { background: rgba(244,246,251,0.85); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.nav-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #4f8ef7, #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
  box-shadow: 0 6px 20px rgba(79,142,247,0.35);
}
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; transition: all 0.2s ease; cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 20px rgba(79,142,247,0.28); }
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-danger { background: var(--red-dim); border-color: rgba(248,113,113,0.2); color: var(--red); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }

/* ─── Cards ─── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}
.card-solid {
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }

/* ─── Glass card ─── */
.glass-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}

/* ─── Tags / Badges ─── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.tag-green { background: var(--green-dim); color: var(--green); }
.tag-blue { background: var(--primary-dim); color: var(--primary); }
.tag-yellow { background: var(--yellow-dim); color: var(--yellow); }
.tag-red { background: var(--red-dim); color: var(--red); }
.tag-grey { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.tag-purple { background: var(--purple-dim); color: var(--purple); }

/* ─── Status dot ─── */
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); box-shadow: 0 0 6px rgba(74,222,128,0.5); }
.dot-red { background: var(--red); box-shadow: 0 0 6px rgba(248,113,113,0.5); }
.dot-yellow { background: var(--yellow); }
.dot-grey { background: var(--muted); }

/* ─── Form elements ─── */
.input {
  width: 100%; padding: 9px 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.input:focus { border-color: var(--primary); }
.input::placeholder { color: var(--muted); }
select.input { appearance: none; cursor: pointer; }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.modal {
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; width: min(440px, calc(100% - 32px));
  box-shadow: var(--shadow);
}
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.form-row { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }

/* ─── Empty state ─── */
.empty {
  text-align: center; padding: 40px 20px;
  color: var(--muted); font-size: 13px;
}

/* ─── Footer ─── */
.footer {
  text-align: center; font-size: 12px; color: var(--muted);
  padding: 20px 0; border-top: 1px solid var(--border); margin-top: 32px;
}

/* ─── Divider ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── Mono text ─── */
.mono { font-family: "Menlo", "Consolas", monospace; font-size: 11px; }

/* ─── Theme toggle ─── */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--muted); cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--surface-hover); color: var(--text); }

/* ─── Section header ─── */
.section-label {
  font-size: 12px; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.section-title { font-size: clamp(22px, 3vw, 34px); letter-spacing: -0.025em; font-weight: 800; margin-bottom: 10px; }
.section-desc { font-size: 15px; color: var(--muted); max-width: 540px; }

/* ─── Grid ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .container { width: min(calc(100% - 28px), 1160px); }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
