/* 科普趣答·鱼虾图鉴 — 磨玻璃高级风 v0.2 */
:root {
  --brand: #1aa8c9;
  --brand-2: #6ce5e8;
  --brand-3: #3f8efc;
  --brand-ink: #061a28;
  --accent: #ff8e3c;
  --accent-2: #ffd166;
  --violet: #8a6cff;
  --pink: #ff6ca8;

  --ink: #0b2136;
  --ink-2: rgba(11, 33, 54, 0.72);
  --ink-3: rgba(11, 33, 54, 0.48);
  --ink-inv: #eaf6fb;

  --line: rgba(255, 255, 255, 0.42);
  --line-dark: rgba(10, 40, 60, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-bg-dark: rgba(8, 24, 38, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-dark: rgba(255, 255, 255, 0.14);

  --radius: 18px;
  --radius-lg: 26px;

  --shadow-s: 0 4px 14px rgba(8, 60, 90, 0.08), inset 0 1px 0 rgba(255,255,255,.55);
  --shadow:   0 14px 40px rgba(8, 60, 90, 0.14), inset 0 1px 0 rgba(255,255,255,.6);
  --shadow-hi: 0 24px 70px rgba(8, 60, 90, 0.24), inset 0 1px 0 rgba(255,255,255,.75);

  --glow-brand: 0 0 0 1px rgba(26,168,201,.35), 0 18px 60px rgba(26,168,201,.25);
  --glow-accent: 0 0 0 1px rgba(255,142,60,.3), 0 18px 60px rgba(255,142,60,.22);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "SF Pro Display", -apple-system, "PingFang SC", "HarmonyOS Sans", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  letter-spacing: .1px;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1100px 720px at 6% -8%, #a9e1f2 0%, rgba(169,225,242,0) 60%),
    radial-gradient(900px 640px at 96% -4%, #ffd8b0 0%, rgba(255,216,176,0) 55%),
    radial-gradient(900px 720px at 50% 120%, #a0e8d4 0%, rgba(160,232,212,0) 55%),
    radial-gradient(700px 520px at 82% 48%, #cdb6ff 0%, rgba(205,182,255,0) 60%),
    linear-gradient(180deg, #eaf6fb 0%, #e9eef7 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 26%, rgba(255,255,255,.55), transparent 36%),
    radial-gradient(circle at 82% 72%, rgba(255,255,255,.35), transparent 42%);
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }

/* Glass util */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Top Nav */
.nav {
  position: sticky; top: 14px; z-index: 50;
  margin: 14px 20px 0;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 14px 44px rgba(8,60,90,.12), inset 0 1px 0 rgba(255,255,255,.8);
  color: var(--ink);
}
.nav .logo {
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  color: var(--brand-ink);
  letter-spacing: .3px;
  padding-right: 10px; margin-right: 4px;
  border-right: 1px solid rgba(10,40,60,.08);
}
.nav .logo-mark {
  width: 32px; height: 32px; border-radius: 11px;
  background: conic-gradient(from 120deg, #ff8e3c, #ffd166, #6ce5e8, #8a6cff, #ff8e3c);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(255,142,60,.3), inset 0 1px 0 rgba(255,255,255,.65);
  color: #fff;
}
.nav a.tab {
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 999px;
  transition: .2s;
  font-size: 13px;
  border: 1px solid transparent;
  font-weight: 500;
}
.nav a.tab:hover { background: rgba(255,255,255,.7); color: var(--brand-ink); }
.nav a.tab.active {
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.75));
  color: var(--brand-ink);
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 6px 18px rgba(8,60,90,.14), inset 0 1px 0 rgba(255,255,255,.9);
}
.nav .spacer { flex: 1; }
.nav .user {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.7);
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  font-size: 12px; border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.nav .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #ff8e3c, #ffd166);
  display:inline-flex; align-items:center; justify-content:center;
  font-weight: 700; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

/* Container */
.container {
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 22px 28px 8px;
  flex: 1; display: flex; flex-direction: column;
}
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Card */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,0) 42%);
}
.card::after {
  content:""; position: absolute; inset: 0; pointer-events:none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); border-color: rgba(255,255,255,.95); }
.card h3 { margin: 0 0 10px; font-size: 15px; color: var(--brand-ink); position: relative; font-weight: 700; letter-spacing: .2px; }
.card p { margin: 6px 0; color: var(--ink-2); position: relative; }

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 13px;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  cursor: pointer; font-size: 13px; transition: .18s;
  box-shadow: 0 4px 14px rgba(8,60,90,.08), inset 0 1px 0 rgba(255,255,255,.85);
  font-weight: 600;
}
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, #1aa8c9 0%, #3f8efc 55%, #6ce5e8 110%);
  color: #fff; border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 14px 28px rgba(26,168,201,.45), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn.primary:hover { filter: brightness(1.05); color: #fff; }
.btn.accent {
  background: linear-gradient(135deg, #ff8e3c 0%, #ffd166 100%);
  color: #5a2a00; border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 14px 28px rgba(255,142,60,.42), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn.ghost { background: transparent; box-shadow: none; }
.btn.dark {
  background: rgba(255,255,255,.14); color:#fff;
  border-color: rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.btn.dark:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn.danger { color: #c2324a; border-color: rgba(224,56,78,.35); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 10px; }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--brand-ink);
  font-size: 12px; cursor: pointer; transition: .18s;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  font-weight: 500;
}
.chip:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); }
.chip.active {
  background: linear-gradient(135deg, #1aa8c9, #3f8efc 60%, #6ce5e8);
  color: #fff; border-color: rgba(255,255,255,.6);
  box-shadow: 0 8px 18px rgba(26,168,201,.42), inset 0 1px 0 rgba(255,255,255,.45);
}
.chip.outline { background: rgba(255,255,255,.4); color: var(--ink-2); }
.chip.outline.active { background: rgba(255,255,255,.95); color: var(--brand); border-color: rgba(26,168,201,.45); }
.chip.ghost-dark { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.chip.ghost-dark:hover { background: rgba(255,255,255,.28); }

/* Tag */
.tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: rgba(26,168,201,.14); color: var(--brand);
  border: 1px solid rgba(26,168,201,.28);
}
.tag.warn { background: rgba(234,179,8,.18); color: #a67400; border-color: rgba(234,179,8,.35); }
.tag.ok   { background: rgba(23,169,116,.18); color: #10754f; border-color: rgba(23,169,116,.35); }
.tag.err  { background: rgba(224,56,78,.18); color: #b5263b; border-color: rgba(224,56,78,.35); }

/* Form */
.input, .textarea, .select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 13px;
  outline: none;
  transition: .18s;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(26,168,201,.18), inset 0 1px 0 rgba(255,255,255,.7);
}
.textarea { resize: vertical; min-height: 96px; }
.label { display:block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 48px 32px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.28));
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; right: -120px; top: -140px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,229,232,.6), transparent 65%);
  filter: blur(6px);
}
.hero::after {
  content: ""; position: absolute; left: -100px; bottom: -160px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,142,60,.4), transparent 70%);
  filter: blur(6px);
}
.hero h1 { margin: 0 0 10px; font-size: 32px; color: var(--brand-ink); position: relative; letter-spacing: .3px; font-weight: 800; }
.hero p { margin: 0; color: var(--ink-2); max-width: 720px; position: relative; font-size: 14.5px; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 14px;
}
.section-title h2 { font-size: 16px; margin: 0; color: var(--brand-ink); letter-spacing: .3px; font-weight: 700; }
.section-title .hint { color: var(--ink-3); font-size: 12px; }

/* Horizontal scroll (species) */
.hscroll {
  display: flex; gap: 14px; overflow-x: auto;
  padding: 10px 6px 20px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
.hscroll::-webkit-scrollbar { height: 6px; }
.hscroll::-webkit-scrollbar-thumb { background: rgba(26,168,201,.35); border-radius: 3px; }
.species-card {
  flex: 0 0 122px;
  background: rgba(255,255,255,.58);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 20px;
  text-align: center;
  padding: 14px 10px 12px;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
  box-shadow: 0 8px 22px rgba(8,60,90,.08), inset 0 1px 0 rgba(255,255,255,.85);
  position: relative; overflow: hidden;
}
.species-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,0) 55%);
}
.species-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hi);
  border-color: rgba(26,168,201,.6);
}
.species-card .img {
  width: 80px; height: 80px; margin: 0 auto 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.85), rgba(255,255,255,.2) 55%),
    linear-gradient(135deg, #cfeaf4 0%, #ffe1c2 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  box-shadow: inset 0 2px 6px rgba(255,255,255,.85), 0 6px 14px rgba(8,60,90,.08);
  position: relative;
}
.species-card .name { font-size: 13px; font-weight: 700; color: var(--brand-ink); position: relative; }
.species-card .sub { font-size: 11px; color: var(--ink-3); position: relative; }

.footer {
  color: var(--ink-3); text-align: center; padding: 10px 20px 14px; font-size: 11.5px;
  margin-top: auto;
}

/* Utils */
.flex { display: flex; }
.flex.center { align-items: center; }
.flex.between { justify-content: space-between; }
.flex.gap-4 { gap: 4px; }
.flex.gap-8 { gap: 8px; }
.flex.gap-12 { gap: 12px; }
.flex.gap-16 { gap: 16px; }
.flex.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top:8px; } .mt-16 { margin-top:16px; } .mt-24 { margin-top:24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom:8px; } .mb-16 { margin-bottom:16px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(10,40,60,.14), transparent); margin: 16px 0; }

/* Device (mobile prototype) */
.device {
  width: 396px;
  margin: 10px auto 0;
  border-radius: 46px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(255,255,255,.65), rgba(255,255,255,.25));
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 30px 80px rgba(8,60,90,.28), var(--shadow-hi);
  height: 844px;
  display: flex; flex-direction: column;
  position: relative;
}
.device::before {
  content:""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px; border-radius: 999px;
  background: rgba(8,18,30,.82);
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.device-inner {
  flex: 1; border-radius: 36px; overflow: hidden;
  background: linear-gradient(180deg, #eaf6fb 0%, #f5f0ea 100%);
  display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,.55);
  position: relative;
}
.device-status {
  color: var(--brand-ink); padding: 14px 26px 8px;
  font-size: 11px; display:flex; justify-content: space-between;
  font-weight: 700;
}
.device-body { flex: 1; overflow-y: auto; padding: 4px 14px 14px; }
.device-tabbar {
  display: flex; justify-content: space-around;
  padding: 10px 10px 16px;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.7);
}
.device-tabbar .t { text-align: center; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.device-tabbar .t.active { color: var(--brand); }
.device-tabbar .t .ico { font-size: 18px; display: block; }
