/* ============================================================
   恩龙树木博览园 · 数字自然博物馆
   Shared CSS — Future Tech Nature Style (Dark Mode Only)
   ============================================================ */

/* ── Design Tokens ── */
:root {
  /* ── Color System ── */
  --brand-primary: #0a8f6c;
  --brand-primary-light: #10b981;
  --brand-primary-dark: #047857;
  --brand-primary-50: #ecfdf5;
  --brand-primary-100: #d1fae5;
  --brand-primary-200: #a7f3d0;
  --brand-primary-300: #6ee7b7;
  --brand-primary-400: #34d399;
  --brand-primary-500: #10b981;
  --brand-primary-600: #059669;
  --brand-primary-700: #047857;
  --brand-primary-800: #065f46;
  --brand-primary-900: #064e3b;

  /* Accent: Teal-Cyan for tech feel */
  --brand-accent: #06b6d4;
  --brand-accent-light: #22d3ee;
  --brand-accent-dark: #0891b2;

  /* Surface: Dark sophisticated backgrounds */
  --surface-bg: #0f172a;
  --surface-bg-elevated: #1e293b;
  --surface-bg-sunken: #020617;
  --surface-card: #1e293b;
  --surface-card-hover: #334155;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;
  --text-accent: #22d3ee;

  /* Border */
  --border-default: rgba(148, 163, 184, 0.15);
  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-accent: rgba(6, 182, 212, 0.4);
  --border-primary: rgba(16, 185, 129, 0.4);

  /* State Colors */
  --state-success: #10b981;
  --state-warning: #f59e0b;
  --state-error: #ef4444;
  --state-info: #06b6d4;

  /* Glow / Tech effects */
  --glow-primary: rgba(16, 185, 129, 0.15);
  --glow-accent: rgba(6, 182, 212, 0.15);
  --glow-strong: rgba(16, 185, 129, 0.3);

  /* ── Radius Scale ── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ── Spacing Scale ── */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* ── Typography ── */
  --font-display: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.875rem;
  --text-sm: 1rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;

  /* ── Shadow / Depth ── */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow-primary: 0 0 20px rgba(16, 185, 129, 0.15);
  --shadow-glow-accent: 0 0 20px rgba(6, 182, 212, 0.15);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ============================================================
   BASE
   ============================================================ */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--surface-bg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TYPOGRAPHY CLASSES
   ============================================================ */

.heading-display {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.heading-1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.heading-2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.heading-3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

.heading-4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-normal);
  color: var(--text-primary);
}

.text-body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.text-body-sm {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.text-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.text-caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-tertiary);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-accent);
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ── Glass Card ── */
.glass-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-base);
}

.glass-card:hover {
  border-color: var(--border-primary);
  box-shadow: var(--shadow-glow-primary);
  transform: translateY(-4px);
}

/* ── Pill Badge ── */
.pill-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  color: var(--text-tertiary);
  background: rgba(15, 23, 42, 0.4);
  white-space: nowrap;
}

/* ── Section Label ── */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

/* ── Navigation Links ── */
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  font-weight: 500;
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Active state — green text + bottom glow border */
.nav-link[data-active="true"] {
  color: var(--brand-primary-light) !important;
}

.nav-link[data-active="true"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px var(--glow-primary);
}

/* Mobile nav active state */
#mobile-menu .nav-link[data-active="true"] {
  color: var(--brand-primary-light) !important;
  background: var(--glow-primary);
}

#mobile-menu .nav-link[data-active="true"]::after {
  display: none;
}

/* ── Avatar Gradient ── */
.avatar-gradient {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
}

/* ── Search Glass ── */
.search-glass {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-base);
}

.search-glass:focus-within {
  border-color: var(--brand-accent);
  box-shadow: 0 0 16px var(--glow-accent);
}

.search-glass input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.search-glass input::placeholder {
  color: var(--text-tertiary);
}

/* ============================================================
   UTILITIES
   ============================================================ */

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── Table base reset ── */
td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}

th {
  white-space: nowrap;
}

/* ── Data-icon mask utility (for Lucide-style icons via CSS) ── */
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background-color: currentColor;
}


.logo-subtitle{display: none;}
 #site-header{height: 64px;}
.rand-grid {
  grid-template-columns: 56px 2fr 2fr 1fr;
}


.species-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}



#site-footer {
  background: var(--surface-bg-sunken);
  border-top: 1px solid var(--border-default);
}

.footer-heading {
  color: var(--text-primary);
}

.footer-map-pin {
  color: var(--brand-primary-light);
}

.footer-address {
  color: var(--text-secondary);
}

.footer-desc {
  color: var(--text-tertiary);
}

.footer-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link {
  color: var(--text-secondary);
}

.footer-logo-bg {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: white;
}

.footer-logo-text {
  color: var(--text-primary);
}

.footer-tech-desc {
  color: var(--text-tertiary);
}

.footer-tech-link {
  color: var(--brand-accent);
}

.footer-copyright-bar {
  border-top: 1px solid var(--border-subtle);
}

.footer-copyright {
  color: var(--text-tertiary);
}
/* ============================================================
   SPECIES SIGN STYLES
   ============================================================ */

.species-sign-wrapper {
  text-decoration: none;
  display: block;
  transition: transform var(--transition-base);
}

.species-sign-wrapper:hover {
  transform: translateY(-4px);
}

.species-sign {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.tree-sign {
  /* max-width: 280px; */
}

.tree-sign-bg {
  width: 100%;
  height: auto;
  display: block;
}

.tree-sign-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 80px 20px 20px;
  display: flex;
  flex-direction: column;
}

.tree-sign-crown {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: white;
}

.tree-sign-name {
  font-size: 1.75rem;
  font-weight: 700;
  /* margin: 0 0 8px; */
  letter-spacing: 0.1em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tree-sign-latin {
  font-size: 0.75rem;
  font-style: italic;
  /* margin: 0 0 12px; */
  opacity: 0.9;
  font-family: var(--font-mono);
}

.tree-sign-info {
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.6;
  /* background: rgba(0,0,0,0.3); */
  padding: 10px 12px 10px 52px;
  border-radius: 6px;
  /* backdrop-filter: blur(4px); */
}

.tree-sign-info p {
  margin: 2px 0;
}

.tree-sign-info span {
  opacity: 0.8;
}

.tree-sign-trunk {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tree-sign-qr {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tree-sign-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tree-sign-scan {
  font-size: 0.65rem;
  color: #fef3c7;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.leaf-sign {
  /* max-width: 320px; */
}

.leaf-sign-bg {
  width: 100%;
  height: auto;
  display: block;
}

.leaf-sign-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 25px 60px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.leaf-sign-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fef3c7;
  min-width: 0;
}

.leaf-sign-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.1em;
  color: #fffbeb;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  text-align: center;
}

.leaf-sign-info {
  font-size: 0.7rem;
  line-height: 1.6;
  /* background: rgba(0,0,0,0.3); */
  padding: 8px 10px;
  border-radius: 4px;
  /* backdrop-filter: blur(4px); */
}

.leaf-sign-info p {
  margin: 2px 0;
}

.leaf-sign-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.leaf-sign-qr {
  width: 72px;
  height: 72px;
  background: white;
  border-radius: 3px;
  overflow: hidden;
  padding: 0;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.leaf-sign-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.leaf-sign-scan {
  font-size: 0.55rem;
  color: #fef3c7;
  margin: 0;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.search-glass{z-index: 999;position:relative;}

/* ============================================================
   RESPONSIVE: Mobile-first with 16px rem baseline
   ============================================================ */

@media (max-width: 768px) {
 .grid-header {
  text-align: center;
 }
 .rand-grid {
  grid-template-columns: 56px 2fr 1fr 1fr;
}
}

@media (max-width: 640px) {
  
}

@media (max-width: 480px) {
 
}

@media (max-width: 375px) {

}

@media (max-width: 320px) {
 
}
