/* ============================================
   MycoVerso — Design System
   Premium Dark Mode Glassmorphism
   ============================================ */

:root {
  /* Colors - Dark Mode */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-modal: rgba(10,10,15,0.97);
  --bg-overlay: rgba(0,0,0,0.7);
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);
  
  --text-primary: #e8e6f0;
  --text-secondary: #a0a0b8;
  --text-muted: #94a3b8;
  --text-light: #ffffff;
  --text-accent: #a78bfa;
  
  --accent-primary: #a78bfa;
  --accent-secondary: #818cf8;
  --accent-glow: rgba(167,139,250,0.15);
  --accent-glow-strong: rgba(167,139,250,0.3);
  
  /* Potency badge colors */
  --potency-low: #86efac;
  --potency-low-bg: rgba(34,197,94,0.08);
  --potency-low-border: rgba(34,197,94,0.2);
  --potency-medium: #fde047;
  --potency-medium-bg: rgba(234,179,8,0.08);
  --potency-medium-border: rgba(234,179,8,0.2);
  --potency-high: #fdba74;
  --potency-high-bg: rgba(249,115,22,0.08);
  --potency-high-border: rgba(249,115,22,0.2);
  --potency-very-high: #fca5a5;
  --potency-very-high-bg: rgba(239,68,68,0.08);
  --potency-very-high-border: rgba(239,68,68,0.2);
  --potency-extreme: #f87171;
  --potency-extreme-bg: rgba(185,28,28,0.12);
  --potency-extreme-border: rgba(185,28,28,0.3);
  
  /* Danger colors */
  --danger-mortal: #dc2626;
  --danger-toxic: #f97316;
  --danger-non-toxic: #22c55e;
  --danger-edible: #3b82f6;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);
  --transition-normal: 300ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 500ms cubic-bezier(0.4,0,0.2,1);
  
  --sidebar-width: 260px;
}

/* ===== GLOBAL RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[x-cloak] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle at 20% 30%, rgba(167, 139, 250, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.03) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-accent); }
h4 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; color: var(--text-primary); }
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }
img { max-width: 100%; max-width: 1400px; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
ul { list-style: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  position: fixed; left: 0; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 2rem 1rem;
  z-index: 40;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.sidebar::-webkit-scrollbar,
.mobile-sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track,
.mobile-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb,
.mobile-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover,
.mobile-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.35);
}

.sidebar-header {
  margin-bottom: 2rem;
  cursor: pointer;
  padding: 0 0.5rem;
  transition: opacity 0.2s ease;
}
.sidebar-header:hover {
  opacity: 0.9;
}
.sidebar-title { 
  font-size: 1.55rem; 
  color: #ffffff; 
  font-family: var(--font-display); 
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0;
  line-height: 1.15;
}
.sidebar-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  min-height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
  text-decoration: none;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(167, 139, 250, 0.08);
  color: var(--text-primary);
}
.sidebar-link:active {
  transform: scale(0.98);
}
.sidebar-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.sidebar-link.active {
  background: rgba(167, 139, 250, 0.14);
  color: var(--accent-primary);
  font-weight: 700;
  box-shadow: inset 3px 0 0 0 var(--accent-primary), inset 0 0 0 1px rgba(167, 139, 250, 0.22);
}
.sidebar-link .material-symbols-outlined {
  font-size: 20px;
  transition: transform 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}
.sidebar-link:hover .material-symbols-outlined {
  transform: scale(1.08);
}
.sidebar-link.active .material-symbols-outlined {
  color: var(--accent-primary);
}

.sidebar-badge-3d {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.sidebar-link:hover .sidebar-badge-3d {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
  color: #ffffff;
}

/* Support Project / Ko-fi Sidebar Special Highlight (Warm Golden Amber) */
.sidebar-link-support {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(251, 191, 36, 0.06) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
  border-radius: var(--radius-sm) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  margin-top: 0.35rem;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.12);
  transition: all var(--transition-fast);
  animation: support-glow-pulse 3.5s ease-in-out infinite;
}

.sidebar-link-support .support-icon {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.sidebar-link-support:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(251, 191, 36, 0.16) 100%) !important;
  border-color: rgba(251, 191, 36, 0.75) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35) !important;
  transform: translateY(-1px);
  color: #ffffff !important;
}

.sidebar-link-support:hover .support-icon {
  transform: scale(1.18);
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.9));
}

.sidebar-badge-kofi {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sidebar-link-support:hover .sidebar-badge-kofi {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #0a0a0f;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

@keyframes support-glow-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
  }
  50% {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
    border-color: rgba(251, 191, 36, 0.6);
  }
}

.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.75rem;
  margin-left: 1.5rem;
  margin-top: -0.1rem;
  margin-bottom: 0.5rem;
  border-left: 1.5px solid rgba(255, 255, 255, 0.08);
  list-style: none;
  overflow: hidden;
}
.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.6rem;
  min-height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
  text-decoration: none;
}
.sidebar-sublink:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(3px);
}
.sidebar-sublink:active {
  transform: scale(0.98);
}
.sidebar-sublink:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
}
.sidebar-sublink.active {
  color: var(--accent-primary);
  font-weight: 600;
  background: rgba(167, 139, 250, 0.08);
  box-shadow: inset 2px 0 0 0 var(--accent-primary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.sidebar-user .material-symbols-outlined {
  font-size: 18px;
  background: var(--accent-glow);
  border-radius: 50%;
  padding: 4px;
}

/* ===== MOBILE SIDEBAR ===== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mobile-sidebar {
  position: fixed; left: 0; top: 0; height: 100%; width: 280px;
  background: var(--bg-secondary); border-right: 1px solid var(--glass-border);
  z-index: 9999; padding: 2rem 1rem; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.transition-slide-in { transition: transform 300ms ease-out; }
.transition-slide-out { transition: transform 200ms ease-in; }

@media (min-width: 1025px) {
  .mobile-overlay, .mobile-sidebar { display: none !important; }
}
@media (max-width: 1024px) {
  .sidebar { display: none; }
}

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
@media (max-width: 1024px) { .main-content { margin-left: 0; } }

/* ===== TOP BAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 1100;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 2rem; max-width: 1400px; margin: 0 auto; width: 100%; max-width: 1400px; }
.topbar-mobile { display: none; align-items: center; gap: 0.75rem; }
.topbar-mobile button { background: none; border: none; color: var(--text-secondary); }
.topbar-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  background: rgba(147, 51, 234, 0.24);
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: #ffffff;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.3), 0 2px 6px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.topbar-mobile button.topbar-back-btn {
  background: rgba(147, 51, 234, 0.24);
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: #ffffff;
}
.topbar-back-btn:hover,
.topbar-mobile button.topbar-back-btn:hover {
  background: rgba(167, 139, 250, 0.38);
  border-color: rgba(216, 180, 254, 0.85);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.55), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.topbar-back-btn:active,
.topbar-mobile button.topbar-back-btn:active {
  transform: scale(0.96);
}
.topbar-back-btn .topbar-back-icon {
  font-size: 1.15rem;
  color: #c084fc;
  transition: transform 0.2s ease, color 0.2s ease;
}
.topbar-back-btn:hover .topbar-back-icon {
  transform: translateX(-3px);
  color: #e9d5ff;
}
.topbar-back-btn .topbar-dash-icon {
  font-size: 1.05rem;
  color: #c084fc;
  transition: color 0.2s ease;
}
.topbar-back-btn:hover .topbar-dash-icon {
  color: #e9d5ff;
}

.topbar-gallery-back-btn {
  background: rgba(147, 51, 234, 0.18);
  border: 1px solid rgba(192, 132, 252, 0.45);
}
.topbar-gallery-back-btn:hover {
  background: rgba(167, 139, 250, 0.35);
  border-color: rgba(216, 180, 254, 0.85);
}

@media (max-width: 480px) {
  .topbar-mobile {
    gap: 0.45rem;
  }
  .topbar-mobile .topbar-back-btn {
    padding: 0.32rem 0.6rem;
    font-size: 0.78rem;
    gap: 0.28rem;
  }
}

@media (max-width: 380px) {
  .topbar-back-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }
}
.topbar-brand { 
  font-family: var(--font-display); 
  font-size: 1.25rem; 
  letter-spacing: 0.02em; 
  color: #ffffff; 
  font-weight: 700; 
}
.topbar-desktop { display: flex; flex: 1; align-items: center; gap: 3rem; }
.topbar-title { 
  font-family: var(--font-display); 
  font-size: 1.15rem; 
  letter-spacing: 0.1em; 
  color: var(--text-primary); 
  cursor: pointer; 
  font-weight: 600; 
  white-space: nowrap; 
  text-transform: uppercase;
}
.topbar-nav { display: flex; gap: 1.5rem; }
.topbar-nav a { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: color var(--transition-fast); }
.topbar-nav a:hover, .topbar-nav a.active { color: var(--accent-primary); }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.btn-accent {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-primary); color: #0a0a0f;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.5rem 1rem; border-radius: var(--radius-sm); border: none;
  transition: all var(--transition-fast);
}
.btn-accent:hover { background: var(--accent-secondary); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow-strong); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  box-shadow: none;
}

@media (max-width: 1024px) {
  .topbar-inner { padding: 0.5rem 1rem; }
  .topbar-mobile { display: flex; }
  .topbar-desktop { display: none; }
}

/* ===== CONTENT CONTAINER ===== */
.content-container { flex: 1; max-width: 1400px; margin: 0 auto; padding: 2.5rem 2rem; width: 100%; max-width: 1400px; }
@media (max-width: 1024px) { .content-container { padding: 1.5rem 1rem; } }

/* ===== TAB CONTENT ===== */
.tab-content { 
    animation: fadeIn 0.35s ease-out; 
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

/* ===== HERO ===== */
.hero-banner { 
  position: relative; 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  margin-bottom: 2rem; 
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 480px;
}
@media (min-width: 1200px) {
  .hero-banner {
    min-height: 520px;
  }
}
.hero-img { 
  position: absolute;
  inset: 0;
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center 25%;
  opacity: 1; 
  filter: brightness(1.22) saturate(1.28) contrast(1.08);
}
.hero-overlay { 
  position: absolute; 
  inset: 0; 
  background: 
    linear-gradient(to top, var(--bg-primary) 0%, rgba(10,10,15,0.75) 15%, rgba(10,10,15,0.35) 45%, transparent 70%),
    linear-gradient(to bottom, rgba(10,10,15,0.25) 0%, transparent 25%),
    radial-gradient(ellipse at 50% 35%, rgba(5, 5, 12, 0.25) 0%, rgba(5, 5, 12, 0.05) 50%, transparent 75%); 
  z-index: 1;
}
.hero-text { 
  position: relative;
  z-index: 2;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: flex-end; 
  text-align: center; 
  padding: 2.25rem 2rem 2.75rem; 
  min-height: 480px;
  width: 100%;
}
@media (min-width: 1200px) {
  .hero-text {
    min-height: 520px;
    padding: 2.5rem 2.25rem 3.25rem;
  }
}

.hero-masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c4b5fd;
  margin-bottom: 0.45rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 1), 0 0 12px rgba(167, 139, 250, 0.5);
}

.hero-text h1, .hero-text .hero-title { 
  font-family: var(--font-display) !important;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: clamp(2.3rem, 5.2vw, 3.8rem); 
  margin: 0 0 0.45rem 0; 
  color: #ffffff;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 1),
    0 4px 14px rgba(0, 0, 0, 0.95),
    0 0 25px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(167, 139, 250, 0.4);
  line-height: 1.12;
}
.hero-text p, .hero-desc { 
  font-size: 0.98rem; 
  font-weight: 450;
  color: rgba(255, 255, 255, 0.92); 
  max-width: 820px; 
  line-height: 1.55;
  margin: 0 auto;
  text-wrap: balance;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 1),
    0 2px 6px rgba(0, 0, 0, 1),
    0 3px 12px rgba(0, 0, 0, 0.95),
    0 0 20px rgba(0, 0, 0, 0.85);
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  gap: 0.75rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.hero-btn-text-short {
  display: none;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.45rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-btn .material-symbols-outlined {
  font-size: 20px;
}

.hero-btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  color: #031326;
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.28);
  font-weight: 700;
}

.hero-btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.45);
}

.hero-btn-secondary {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-btn-secondary:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #ffffff;
  border-color: rgba(52, 211, 153, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

@media (max-width: 768px) {
  .hero-btn-text-full {
    display: none !important;
  }
  .hero-btn-text-short {
    display: inline !important;
  }
  .hero-banner { 
    min-height: 295px; 
    margin-bottom: 1.25rem; 
  }
  .hero-text { 
    min-height: 295px !important;
    padding: 1.25rem 1rem 1.4rem !important;
    margin: 0;
    max-width: 100%;
    justify-content: flex-end !important;
  }
  .hero-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    margin-bottom: 0.25rem;
  }
  .hero-text h1, .hero-text .hero-title {
    font-size: clamp(1.85rem, 5.2vw, 2.35rem);
    margin-bottom: 0.3rem;
  }
  .hero-text p, .hero-desc {
    font-size: 0.84rem;
    font-weight: 450;
    line-height: 1.38;
    max-width: 95%;
    margin: 0 auto;
  }
  .hero-bottom {
    gap: 0.65rem;
  }
  .hero-actions { 
    display: flex !important;
    flex-direction: row !important; 
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 360px;
    gap: 0.5rem; 
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center;
    align-items: center;
  }
  .hero-btn { 
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    padding: 0.5rem 0.55rem; 
    font-size: 0.76rem; 
    border-radius: 9999px;
    gap: 0.35rem;
    white-space: nowrap;
    justify-content: center;
  }
  .hero-btn .material-symbols-outlined {
    font-size: 16px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .hero-banner { 
    min-height: 275px;
    margin-bottom: 1rem; 
  }
  .hero-text { 
    min-height: 275px !important;
    padding: 1rem 0.75rem 1.25rem !important;
    margin: 0;
    max-width: 100%;
    justify-content: flex-end !important;
  }
  .hero-eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }
  .hero-text h1, .hero-text .hero-title {
    font-size: 1.75rem;
  }
  .hero-text p, .hero-desc { 
    font-size: 0.8rem; 
    line-height: 1.35; 
  }
  .hero-bottom {
    gap: 0.5rem;
  }
  .hero-actions { 
    gap: 0.4rem; 
  }
  .hero-btn { 
    padding: 0.42rem 0.4rem; 
    font-size: 0.72rem; 
    gap: 0.25rem;
  }
  .hero-btn .material-symbols-outlined {
    font-size: 15px;
  }
  .showcase-section {
    margin-bottom: 2rem;
  }
}

/* ===== SHOWCASE SECTION (Featured Species Vitrina) ===== */
.showcase-section {
  margin-bottom: 2.75rem;
}

.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.showcase-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.showcase-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.showcase-icon {
  display: inline-block;
  font-size: 1.25rem;
}

.showcase-sub {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0.25rem 0 0 0;
}

.showcase-view-all {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  transition: all var(--transition-fast);
}

.showcase-view-all:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
  transform: translateX(2px);
}

.showcase-scroll-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 0.5rem 0 1.25rem 0;
  margin: 0;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.showcase-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
}

.showcase-group {
  display: flex;
  gap: 1.25rem;
  flex-shrink: 0;
  animation: showcaseMarquee 26s linear infinite;
  will-change: transform;
}

@keyframes showcaseMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-100% - 1.25rem), 0, 0);
  }
}

/* Pause on hover, touch, or active press */
.showcase-scroll-container:hover .showcase-group,
.showcase-scroll-container:active .showcase-group,
.showcase-track:hover .showcase-group,
.showcase-track:active .showcase-group {
  animation-play-state: paused;
}

.showcase-card {
  flex: 0 0 200px;
  width: 200px;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  display: block;
}

.showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
}

.showcase-card.category-psilo:hover {
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 240, 255, 0.22);
}

.showcase-card.category-wild:hover {
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(248, 113, 113, 0.22);
}

.showcase-card.category-med:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(52, 211, 153, 0.22);
}

.showcase-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.94;
  filter: saturate(1.15) contrast(1.05);
  transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase-card:hover .showcase-img {
  transform: scale(1.04);
  opacity: 1;
}

.showcase-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.96) 0%, rgba(10, 10, 15, 0.45) 45%, rgba(10, 10, 15, 0.08) 75%, transparent 100%);
  pointer-events: none;
}

.showcase-badge-wrap {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
}

.showcase-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.badge-psilo {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.badge-wild {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-med {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.showcase-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 2;
}

.showcase-sci-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.2rem 0;
  line-height: 1.25;
}

.showcase-com-name {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0 0 0.65rem 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-enter-row {
  display: flex;
  align-items: center;
}

.showcase-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.showcase-card:hover .showcase-enter-btn {
  color: #ffffff;
  transform: translateX(3px);
}

@media (min-width: 1200px) {
  .showcase-scroll-container {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding: 0.25rem 0.25rem 1rem 0.25rem;
  }
  .showcase-track {
    display: block;
    width: 100%;
    gap: 0;
  }
  .showcase-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
    width: 100%;
    animation: none !important;
    transform: none !important;
  }
  .showcase-group-clone {
    display: none !important;
  }
  .showcase-card {
    flex: none;
    width: auto;
  }
}

@media (max-width: 768px) {
  .showcase-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .showcase-card {
    flex: 0 0 165px;
    width: 165px;
  }
  .showcase-group {
    animation-duration: 22s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-group {
    animation: none !important;
  }
  .showcase-scroll-container {
    overflow-x: auto !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }
  .showcase-group-clone {
    display: none !important;
  }
}

/* ===== STATS GRID (Dashboard) ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2.5rem; }
.stat-card { 
    padding: 1.5rem 1rem; 
    text-align: center; 
    cursor: pointer;
    position: relative;
    border: none !important;
    background: rgba(17, 17, 24, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px; /* Grosor del borde */
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.8) 0%, rgba(76, 29, 149, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}
.stat-card:hover { transform: translateY(-3px); }

/* Card 1: Especies (Acento Esmeralda Botánico) */
.stats-grid .stat-card:nth-child(1)::before {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.9) 0%, rgba(5, 150, 105, 0.2) 100%);
}
.stats-grid .stat-card:nth-child(1):hover {
    box-shadow: 0 12px 32px rgba(52, 211, 153, 0.22);
}
.stats-grid .stat-card:nth-child(1) .stat-number {
    color: #34d399;
    text-shadow: 0 0 24px rgba(52, 211, 153, 0.35);
}

/* Card 2: Dosificación (Acento Cian Eléctrico / Psilocina) */
.stats-grid .stat-card:nth-child(2)::before {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.9) 0%, rgba(2, 132, 199, 0.2) 100%);
}
.stats-grid .stat-card:nth-child(2):hover {
    box-shadow: 0 12px 32px rgba(56, 189, 248, 0.22);
}
.stats-grid .stat-card:nth-child(2) .stat-number {
    color: #38bdf8;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

/* Card 3: Cultivables (Acento Ámbar Cálido Micelial) */
.stats-grid .stat-card:nth-child(3)::before {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.9) 0%, rgba(217, 119, 6, 0.2) 100%);
}
.stats-grid .stat-card:nth-child(3):hover {
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.22);
}
.stats-grid .stat-card:nth-child(3) .stat-number {
    color: #fbbf24;
    text-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}

/* Card 4: Datos Clínicos (Acento Violeta / Neurociencia) */
.stats-grid .stat-card:nth-child(4)::before {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.9) 0%, rgba(147, 51, 234, 0.2) 100%);
}
.stats-grid .stat-card:nth-child(4):hover {
    box-shadow: 0 12px 32px rgba(192, 132, 252, 0.22);
}
.stats-grid .stat-card:nth-child(4) .stat-number {
    color: #c084fc;
    text-shadow: 0 0 24px rgba(192, 132, 252, 0.35);
}

.stat-number { display: block; font-size: 2.5rem; font-weight: 700; font-family: var(--font-display); }
.stat-label { 
    display: block; 
    font-size: 0.82rem; 
    font-weight: 600;
    color: #cbd5e1; 
    text-transform: uppercase; 
    letter-spacing: 0.08em; 
    margin-top: 0.35rem; 
}
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== VOLUMES GRID (Dashboard) ===== */
.volumes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.volume-card { 
    overflow: hidden; 
    cursor: pointer; 
    border-radius: var(--radius-md);
    background: rgba(17, 17, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
}
.volume-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(167, 139, 250, 0.18); 
    border-color: rgba(167, 139, 250, 0.4); 
}
.volume-card img { 
    width: 100%; 
    max-width: 1400px; 
    height: 240px; 
    object-fit: cover; 
    object-position: center 35%; 
    opacity: 0.94; 
    filter: saturate(1.12) contrast(1.02);
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity var(--transition-normal); 
}
.volume-card:hover img { 
    opacity: 1; 
    transform: scale(1.02);
}
.volume-info { 
    padding: 1.35rem; 
    background: linear-gradient(180deg, rgba(17, 17, 24, 0.94) 0%, rgba(10, 10, 15, 0.98) 100%);
    flex: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.volume-info h3, .volume-info h2 { 
    font-size: 1.08rem; 
    color: #f8fafc; 
    font-weight: 600;
    margin-bottom: 0.45rem; 
}
.volume-info p { 
    font-size: 0.875rem; 
    color: #94a3b8; 
    line-height: 1.55;
}
@media (max-width: 640px) { .volumes-grid { grid-template-columns: 1fr; } }
@media (min-width: 641px) and (max-width: 1024px) { .volumes-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .volume-card img { height: 255px; } }
@media (min-width: 1025px) { .volume-card img { height: 255px; } }

/* Realce sutil en hover para Taxonomía, Medicinales, Comestibles, Juego y Soporte */
.volumes-grid .volume-card:nth-child(1):hover {
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(52, 211, 153, 0.22);
}
.volumes-grid .volume-card:nth-child(1) img {
    object-position: center 20%;
}
.volumes-grid .volume-card:nth-child(2):hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 189, 248, 0.22);
}
.volumes-grid .volume-card:nth-child(2) img {
    object-position: center 28%;
}
.volumes-grid .volume-card:nth-child(3):hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 158, 11, 0.22);
}
.volumes-grid .volume-card:nth-child(3) img {
    object-position: center 48%;
}
.volumes-grid .volume-card:nth-child(4) img {
    object-position: center 32%;
}
.volumes-grid .volume-card:nth-child(11):hover {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 189, 248, 0.25);
}
.volumes-grid .volume-card:nth-child(12):hover {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 158, 11, 0.25);
}
.volumes-grid .volume-card:nth-child(12) img {
    object-position: center center;
}

/* ===== SECTION HEADER ===== */
.section-header { 
    padding: 2rem; 
    margin-bottom: 2rem; 
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}
.section-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; max-width: 1400px; height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
}
.section-header h1,
.section-header h2 { 
    margin-bottom: 0.75rem; 
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-light);
}
.section-header p { 
    color: var(--text-muted); 
    font-size: 1.05rem; 
    line-height: 1.6;
    margin: 0;
}

.coming-soon-text { color: var(--text-muted); margin-bottom: 1rem; }

/* ===== SEARCH & FILTERS ===== */
.search-filters {
  position: relative;
  z-index: 1000;
  overflow: visible !important;
  background: rgba(31, 31, 37, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.search-bar {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 0.75rem 1rem;
  transition: all var(--transition-fast); margin-bottom: 1rem;
}
.search-bar:focus-within { border-color: var(--accent-primary); box-shadow: 0 0 0 2px var(--accent-glow); }
.search-bar .material-symbols-outlined { color: var(--text-muted); font-size: 22px; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 0.95rem; font-family: var(--font-body);
}
.search-input::placeholder { color: var(--text-muted); }
.clear-btn { background: none; border: none; color: var(--text-muted); padding: 0.25rem; border-radius: 50%; transition: all var(--transition-fast); }
.clear-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }
.filter-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 0.75rem; }
.filter-select {
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  background: var(--bg-tertiary); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.85rem; font-family: var(--font-body);
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b8' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 1em;
  transition: all var(--transition-fast);
}
.filter-select:focus { outline: none; border-color: var(--accent-primary); }
.results-count { font-size: 0.8rem; color: var(--text-muted); }

/* ===== CUSTOM GLASS DROPDOWN SYSTEM ===== */
.filter-controls-row {
  position: relative;
  z-index: 1000;
  overflow: visible !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.filter-select-group {
  position: relative;
  overflow: visible !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 1 340px;
  max-width: 100%;
}

.filter-label {
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.custom-dropdown-container {
  position: relative;
  flex: 1;
  min-width: 200px;
  overflow: visible !important;
}

.custom-dropdown-container.is-open {
  z-index: 1050 !important;
}

.custom-dropdown-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.95rem;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.custom-dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.22);
}

.custom-dropdown-trigger.is-active {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.trigger-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.trigger-badge {
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1;
}

.custom-dropdown-trigger.is-active .trigger-badge {
  background: rgba(168, 85, 247, 0.18);
  color: #e9d5ff;
  border-color: rgba(168, 85, 247, 0.3);
}

.trigger-chevron {
  color: var(--text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.trigger-chevron.is-open {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

/* Floating Menu Popover */
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 99999 !important;
  min-width: 100%;
  width: max-content;
  max-width: min(340px, calc(100vw - 2.5rem));
  padding: 6px;
  background: #0d121f !important;
  background: rgba(13, 18, 31, 0.99) !important;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px;
  box-shadow: 0 24px 60px -6px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.custom-dropdown-item {
  width: 100%;
  min-height: 38px;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.custom-dropdown-item.is-selected {
  background: rgba(168, 85, 247, 0.14);
  color: #f3e8ff;
  font-weight: 600;
}

.item-title {
  flex: 1;
  letter-spacing: -0.01em;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-count {
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-dropdown-item.is-selected .item-count {
  background: rgba(168, 85, 247, 0.25);
  color: #f3e8ff;
  border-color: rgba(168, 85, 247, 0.35);
}

.item-check {
  color: #c084fc;
  flex-shrink: 0;
}

/* Transitions */
.dropdown-enter {
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropdown-enter-start {
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
}
.dropdown-enter-end {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.dropdown-leave {
  transition: opacity 0.12s ease-in, transform 0.12s ease-in;
}
.dropdown-leave-start {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.dropdown-leave-end {
  opacity: 0;
  transform: translateY(-3px) scale(0.98);
}

@media (max-width: 640px) {
  .filter-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .filter-select-group {
    flex: 1 1 100%;
    width: 100%;
  }
  .custom-dropdown-menu {
    width: 100%;
    max-width: 100%;
  }
  .results-count {
    text-align: right;
  }
}

/* ===== SPECIES GRID ===== */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
@media (max-width: 640px) { .species-grid { grid-template-columns: 1fr; } }

/* ===== SPECIES CARD ===== */
.species-card { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.species-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px var(--accent-glow-strong); border-color: var(--accent-glow-strong); }
.species-card-img { position: relative; width: 100%; max-width: 1400px; aspect-ratio: 1 / 1; overflow: hidden; }
.species-card-img img { width: 100%; max-width: 1400px; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.species-card:hover .species-card-img img { transform: scale(1.08); }
.species-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,15,0.5) 0%, transparent 45%); }
.species-card-img .badge { position: absolute; bottom: 0.75rem; left: 0.75rem; z-index: 2; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.species-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.species-name { font-family: var(--font-display); font-size: 1.1rem; font-style: italic; margin-bottom: 0.25rem; }
.species-authority { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.species-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.species-common { font-size: 0.8rem; color: var(--text-secondary); margin-top: auto; }

/* ===== TAGS ===== */
.tag {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem; border-radius: 4px;
  font-size: 0.7rem; font-weight: 500;
  background: rgba(255,255,255,0.05); color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.3rem 0.8rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.badge-low { background: var(--potency-low-bg); color: var(--potency-low); border: 1px solid var(--potency-low-border); }
.badge-medium { background: var(--potency-medium-bg); color: var(--potency-medium); border: 1px solid var(--potency-medium-border); }
.badge-high { background: var(--potency-high-bg); color: var(--potency-high); border: 1px solid var(--potency-high-border); }
.badge-very-high { background: var(--potency-very-high-bg); color: var(--potency-very-high); border: 1px solid var(--potency-very-high-border); }
.badge-extreme { background: var(--potency-extreme-bg); color: var(--potency-extreme); border: 1px solid var(--potency-extreme-border); }
.badge-mortal { background: rgba(220,38,38,0.15); color: #fca5a5; border: 1px solid rgba(220,38,38,0.4); }
.badge-toxic { background: rgba(249,115,22,0.12); color: #fdba74; border: 1px solid rgba(249,115,22,0.3); }
.badge-safe { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.badge-edible { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state .material-symbols-outlined { font-size: 64px; margin-bottom: 1rem; color: var(--text-muted); }
.empty-state h3 { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; }

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem 1rem 1rem;
}
.modal-inner-wrapper { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 1400px; overflow: hidden; }
.modal-container {
  width: 100%; max-width: 1400px; max-width: 900px; max-height: 92vh;
  background: var(--bg-modal);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

/* Modal Transitions */
.transition-fade-in { transition: opacity 300ms ease; }
.transition-fade-out { transition: opacity 200ms ease; }
.transition-slide-up { transition: transform 300ms cubic-bezier(0.16,1,0.3,1), opacity 300ms ease; }
.transition-slide-down { transition: transform 200ms ease-in, opacity 200ms ease; }

/* Modal Header */
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.modal-header-info { flex: 1; min-width: 0; padding-right: 1rem; }
.modal-title { font-size: 1.5rem; font-style: italic; margin-bottom: 0.15rem; word-break: break-word; }
.modal-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.modal-close {
  flex-shrink: 0;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition-fast);
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* Modal & Card Header Actions & Pagination Navigation */
.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.modal-nav-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 2px 4px;
}
.modal-nav-arrow-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.modal-nav-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-primary);
  transform: scale(1.08);
}
.modal-nav-arrow-btn:active {
  transform: scale(0.95);
}
.modal-nav-arrow-btn .material-symbols-outlined {
  font-size: 1.25rem;
}

/* Modal & Card Footer Navigation */
.modal-footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
}
.modal-footer-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  min-width: 0;
}
.modal-footer-nav-btn.next {
  justify-content: flex-end;
  text-align: right;
}
.modal-footer-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.modal-footer-nav-btn:hover .nav-arrow-icon {
  color: var(--accent-primary);
  transform: translateX(-3px);
}
.modal-footer-nav-btn.next:hover .nav-arrow-icon {
  transform: translateX(3px);
}
.nav-arrow-icon {
  flex-shrink: 0;
  transition: transform var(--transition-fast), color var(--transition-fast);
  color: var(--text-muted);
}
.modal-footer-nav-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.modal-footer-nav-info .nav-direction {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.modal-footer-nav-info .nav-target {
  font-size: 0.95rem;
  font-weight: 600;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
@media (max-width: 640px) {
  .modal-footer-nav {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* Modal Tabs */
.modal-tabs {
  display: flex; overflow-x: auto;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.01);
  flex-shrink: 0;
  margin-bottom: 1.5rem;
}
.modal-tabs button {
  padding: 0.6rem 1.2rem; background: transparent; border: none;
  color: var(--text-muted); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.03em; white-space: nowrap;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.modal-tabs button:hover { 
  color: var(--text-primary); 
  background: rgba(255, 255, 255, 0.03); 
}
.modal-tabs button.active { 
  color: var(--accent-primary); 
  border-bottom-color: var(--accent-primary); 
  background: var(--accent-glow); 
}
/* Custom Scrollbar para las pestañas */
.modal-tabs::-webkit-scrollbar { height: 3px; }
.modal-tabs::-webkit-scrollbar-track { background: transparent; }
.modal-tabs::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }
.modal-tabs::-webkit-scrollbar-thumb:hover { background: var(--accent-glow); }

/* Modal Body */
.modal-body { flex: 1; overflow-y: auto; padding: 1.5rem; min-height: 0; }
.modal-tab-content { animation: fadeIn 0.3s ease; }

/* ===== DETAIL SECTIONS ===== */
.detail-section { margin-bottom: 2rem; }
.detail-section h3 { margin-bottom: 0.75rem; }
.detail-section p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* Detail Hero (General Tab) */
.detail-hero { display: flex; gap: 1.5rem; margin-bottom: 2rem; }
.detail-img { width: 280px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; }
.detail-meta { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.meta-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.meta-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; min-width: 90px; }
.meta-value { font-size: 0.9rem; color: var(--text-primary); }
@media (max-width: 640px) { .detail-hero { flex-direction: column; } .detail-img { width: 100%; max-width: 1400px; height: auto; aspect-ratio: 1 / 1; } }

/* Names Grid */
.names-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.names-grid > div { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--text-secondary); }
.names-lang { font-weight: 600; min-width: 85px; }

/* ===== MORPHOLOGY GRID ===== */
.morphology-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.morph-card { padding: 1.25rem; }
.morph-card h3, .morph-card h4 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.morph-card h3 .material-symbols-outlined, .morph-card h4 .material-symbols-outlined { font-size: 18px; color: var(--accent-primary); }
.morph-detail { display: flex; justify-content: space-between; padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 0.85rem; }
.morph-detail span:first-child { color: var(--text-muted); }
.morph-detail span:last-child { color: var(--text-primary); text-align: right; max-width: 60%; }
.full-width { grid-column: 1 / -1; }
@media (max-width: 640px) { .morphology-grid { grid-template-columns: 1fr; } }

/* ===== CHEMISTRY BARS ===== */
.chemistry-bars { display: flex; flex-direction: column; gap: 0.75rem; }
.chem-row { display: flex; align-items: center; gap: 1rem; }
.chem-label { font-size: 0.85rem; color: var(--text-secondary); min-width: 120px; }
.chem-bar-track { flex: 1; height: 10px; background: var(--bg-tertiary); border-radius: 5px; overflow: hidden; }
.chem-bar { height: 100%; border-radius: 5px; transition: width 1s cubic-bezier(0.4,0,0.2,1); }
.chem-bar-psilocybin { background: linear-gradient(90deg, #818cf8, #a78bfa); }
.chem-bar-psilocin { background: linear-gradient(90deg, #6ee7b7, #34d399); }
.chem-bar-baeocystin { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.chem-bar-aeruginascin { background: linear-gradient(90deg, #f472b6, #ec4899); }
.chem-bar-ibotenic { background: linear-gradient(90deg, #f87171, #ef4444); }
.chem-bar-muscimol { background: linear-gradient(90deg, #fb923c, #f97316); }
.chem-value { font-size: 0.8rem; color: var(--text-muted); min-width: 120px; text-align: right; font-family: var(--font-mono); }
.chem-total { display: flex; justify-content: space-between; padding-top: 0.75rem; margin-top: 0.5rem; border-top: 1px solid var(--glass-border); font-size: 0.9rem; }
.chem-total strong { color: var(--accent-primary); }
.chem-sources { margin-top: 1.5rem; padding: 1rem; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.chem-sources h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.chem-sources p { font-size: 0.8rem; color: var(--text-secondary); }
.amanita-warning {
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm); color: #fca5a5; font-size: 0.85rem;
}

/* ===== HABITAT ===== */
.habitat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.habitat-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--bg-tertiary); border-radius: var(--radius-sm); }
.habitat-icon { font-size: 1.5rem; }
.habitat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.habitat-value { font-size: 0.85rem; color: var(--text-primary); }
.distribution-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
@media (max-width: 640px) { .habitat-grid { grid-template-columns: 1fr; } }

/* ===== LOOKALIKES ===== */
.warning-text { color: #fca5a5; font-size: 0.85rem; margin-bottom: 1rem; }


/* ===== REFERENCES ===== */
.references-list { padding-left: 1.25rem; list-style: disc; }
.references-list li { padding: 0.35rem 0; color: var(--text-secondary); font-size: 0.9rem; }

/* ===== CULTIVATION LAYOUT ===== */
.cultivation-layout { display: flex; gap: 2rem; align-items: stretch; }
.cultivation-nav { 
  width: 320px; 
  flex-shrink: 0; 
  padding: 1.5rem 1.15rem; 
  display: flex; 
  flex-direction: column; 
  gap: 0.65rem; 
}
.cultivation-nav h3 { 
  font-size: 0.76rem; 
  font-family: var(--font-body);
  text-transform: uppercase; 
  letter-spacing: 0.14em; 
  color: #c4b5fd; 
  margin-bottom: 0.85rem; 
  padding: 0 0.5rem; 
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}
.cultivation-nav h3::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 8px #a78bfa;
}

.cultivation-nav button,
.cultivation-nav .sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.72rem 1rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.cultivation-nav button .material-symbols-outlined,
.cultivation-nav .sidebar-link .material-symbols-outlined {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  color: #c084fc;
  font-size: 19px;
  transition: all 0.22s ease;
}

.cultivation-nav button::after,
.cultivation-nav .sidebar-link::after {
  content: '→';
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.2);
  opacity: 0.6;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cultivation-nav button:hover,
.cultivation-nav .sidebar-link:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.45);
  color: #ffffff;
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 14px rgba(167, 139, 250, 0.18);
}

.cultivation-nav button:hover .material-symbols-outlined,
.cultivation-nav .sidebar-link:hover .material-symbols-outlined {
  background: rgba(167, 139, 250, 0.25);
  border-color: rgba(192, 132, 252, 0.65);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.45);
  transform: scale(1.05);
}

.cultivation-nav button:hover::after,
.cultivation-nav .sidebar-link:hover::after {
  color: #c084fc;
  opacity: 1;
  transform: translateX(3px);
}

.cultivation-nav button:active,
.cultivation-nav .sidebar-link:active {
  transform: scale(0.98) translateX(2px);
}

.cultivation-nav button.active,
.cultivation-nav .sidebar-link.active {
  background: rgba(167, 139, 250, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.6);
  border-right: 1px solid rgba(167, 139, 250, 0.6);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #a78bfa, 0 0 16px rgba(167, 139, 250, 0.25);
}

.cultivation-nav button.active .material-symbols-outlined,
.cultivation-nav .sidebar-link.active .material-symbols-outlined {
  background: rgba(167, 139, 250, 0.32);
  border-color: #a78bfa;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
}

.cultivation-nav button.active::after,
.cultivation-nav .sidebar-link.active::after {
  color: #a78bfa;
  opacity: 1;
}

.cultivation-content { flex: 1; padding: 2.5rem; min-height: 600px; }
.cultivation-content h2 { font-size: 2rem; margin-bottom: 1rem; color: var(--text-primary); font-family: var(--font-display); }
.cultivation-content h3 { font-size: 1.3rem; margin-bottom: 0.75rem; margin-top: 2rem; color: var(--text-primary); font-family: var(--font-display); }
.cultivation-content p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.25rem; font-size: 1.05rem; }
.cultivation-content ul, .cultivation-content ol { padding-left: 1.5rem; color: var(--text-secondary); margin-bottom: 1.25rem; }
.cultivation-content li { margin-bottom: 0.5rem; line-height: 1.6; }

@media (max-width: 1024px) {
    .cultivation-layout { flex-direction: column; gap: 1.25rem; }
    .hero-index,
    .cultivation-layout > div[x-show*="index"],
    .cultivation-layout > div:not(.cultivation-content):not(.cultivation-nav) { 
        order: 1; 
    }
    .cultivation-nav { 
        order: 2;
        width: 100%; 
        max-width: 100%; 
        position: relative; 
        top: 0; 
        flex-direction: column; 
        padding: 1.25rem 1rem; 
        gap: 0.6rem; 
    }
    .cultivation-nav button, .cultivation-nav .sidebar-link { 
        width: 100%; 
        max-width: 100%; 
        white-space: normal; 
        height: auto; 
        text-align: left;
        padding: 0.8rem 1rem; 
    }
    .cultivation-nav h3 { width: 100%; max-width: 100%; }
    .cultivation-content { 
        order: 3;
        padding: 1rem; 
    }
}

/* ===== FOOTER ===== */
.app-footer {
  margin-left: var(--sidebar-width);
  padding: 2rem; text-align: center;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted); font-size: 0.75rem;
}
@media (max-width: 1024px) { .app-footer { margin-left: 0; } }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(167,139,250,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(167,139,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(167,139,250,0); }
}

/* ===== SECTION INTRO ===== */
.section-intro { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 2rem; }

/* ===== RESOURCES (SECTION 9) ===== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.resource-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  border-color: rgba(255, 255, 255, 0.2);
}
.resource-icon {
  font-size: 2.2rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}
.resource-card h4 {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.3;
}
.resource-author {
  font-size: 0.78rem;
  color: var(--accent-secondary);
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.resource-card > p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}
@media (max-width: 600px) {
  .resource-grid { grid-template-columns: 1fr; }
}


/* ===== SEGMENTED CONTROL (TRUFFLE TOGGLE) ===== */
.truffle-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(8px);
  gap: 0.25rem;
}

.truffle-toggle-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.truffle-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.truffle-toggle-btn.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: 700;
  box-shadow: 0 4px 12px var(--accent-glow-strong);
}

/* ============================================================
   LEAFLET MAP — Dark Theme Override
   ============================================================ */
#inat-map .leaflet-popup-content-wrapper {
  background: rgba(17, 17, 24, 0.97);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 10px;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
}
#inat-map .leaflet-popup-tip {
  background: rgba(17, 17, 24, 0.97);
}
#inat-map .leaflet-popup-close-button {
  color: var(--text-muted) !important;
}
#inat-map .leaflet-bar a {
  background: rgba(17,17,24,0.95);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.1);
}
#inat-map .leaflet-bar a:hover {
  background: rgba(167,139,250,0.2);
}
#inat-map .leaflet-control-attribution {
  background: rgba(0,0,0,0.5) !important;
  color: var(--text-muted);
  font-size: 0.65rem;
}
#inat-map .leaflet-control-attribution a {
  color: var(--accent-primary);
}

/* ==========================================================================
   PREMIUM BANNERS (Split Layout with Glassmorphism & Micro-animations)
   ========================================================================== */

.premium-banner {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Glow effect underneath */
.premium-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top left, var(--banner-glow, rgba(255,255,255,0.03)), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.premium-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.premium-banner:hover::before {
    opacity: 1;
}

/* Specific colors via CSS variables set inline or classes */
.premium-banner.info-banner {
    --banner-glow: rgba(59, 130, 246, 0.1); /* blue */
    border-left: 4px solid #3b82f6;
}
.premium-banner.warning-banner {
    --banner-glow: rgba(239, 68, 68, 0.1); /* red */
    border-left: 4px solid #ef4444;
}
.premium-banner.myth-banner {
    --banner-glow: rgba(245, 158, 11, 0.1); /* amber */
    border-left: 4px solid #f59e0b;
}

@media (max-width: 768px) {
    .premium-banner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
        border-left-width: 4px !important;
        border-left-style: solid !important;
        border-top: none !important;
        margin-bottom: 1.5rem;
    }
    .premium-banner.info-banner { border-left: 4px solid #3b82f6 !important; }
    .premium-banner.warning-banner { border-left: 4px solid #ef4444 !important; }
    .premium-banner.myth-banner { border-left: 4px solid #f59e0b !important; }
    
    .premium-banner-left {
        flex: 1 1 100%;
        margin-bottom: 0;
    }
    .premium-banner-right {
        flex: 1 1 100%;
    }
    
    .premium-banner h4, .premium-banner h3, .premium-banner strong.banner-title {
        font-size: 1.1rem;
    }
    
    .premium-banner-right p {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .premium-icon-box {
        width: 32px;
        height: 32px;
    }
    .premium-icon-box .material-symbols-outlined {
        font-size: 1.2rem;
    }
}

.premium-banner-left {
    flex: 1 1 200px;
    z-index: 1;
    position: relative;
}

.premium-banner-right {
    flex: 2 1 400px;
    z-index: 1;
    position: relative;
}

.premium-banner-header {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    line-height: 1.3;
    font-size: 1.1rem;
}

/* Icon glowing circle */
.premium-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--banner-glow, rgba(255,255,255,0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px var(--banner-glow, rgba(0,0,0,0));
    flex-shrink: 0;
}

.premium-icon-box .material-symbols-outlined {
    font-size: 1.5rem;
}

.info-banner .premium-icon-box .material-symbols-outlined { color: #3b82f6; }
.warning-banner .premium-icon-box .material-symbols-outlined { color: #ef4444; }
.myth-banner .premium-icon-box .material-symbols-outlined { color: #f59e0b; }

.premium-banner h4, .premium-banner h3, .premium-banner strong.banner-title {
    color: var(--text-light);
    font-size: 1.2rem;
    margin: 0;
}

/* Typography on the right */
.premium-banner-right p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.premium-banner-right p:last-child {
    margin-bottom: 0;
}

/* Emphasis boxes inside right section */
.premium-banner-highlight {
    margin-top: 1rem; 
    border-left: 2px solid var(--text-muted); 
    padding-left: 1rem;
    font-size: 1.05rem;
}
.warning-banner .premium-banner-highlight {
    border-color: #ef4444;
    color: #fca5a5;
}

/* ==========================================================================
   MAP & DASHBOARD UI
   ========================================================================== */

/* Segmented Control (iOS / Modern Dashboard style) */
.segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    padding: 4px;
    margin: 2rem auto;
    width: fit-content;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.segmented-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.segmented-btn:hover {
    color: var(--text-light);
}

.segmented-btn.active {
    background: var(--accent-primary);
    color: #000;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Map Filter Deck (Glass floating panel style) */
.map-filter-deck {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .map-filter-deck {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin: 0 1rem 1.5rem;
    }
}

.map-filter-select {
    flex: 1;
    min-width: 250px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.map-filter-select:focus {
    border-color: var(--accent-primary);
}

.map-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
}

.map-status-badge.loading {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.map-status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.map-inat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 100px;
    text-decoration: none;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.map-inat-link:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.55);
    color: #dbeafe;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   MAP & DASHBOARD UI
   ========================================================================== */

.segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    padding: 4px;
    margin: 2rem auto;
    width: fit-content;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}
.segmented-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.segmented-btn:hover { color: var(--text-light); }
.segmented-btn.active {
    background: var(--accent-primary);
    color: #000;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.map-filter-deck {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.map-filter-select {
    flex: 1; min-width: 250px; padding: 0.75rem 1rem;
    border-radius: var(--radius-sm); border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5); color: var(--text-light);
    font-size: 1rem; font-family: inherit; outline: none; transition: border-color 0.3s ease;
}
.map-filter-select:focus { border-color: var(--accent-primary); }
.map-status-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: 100px; font-size: 0.9rem; font-weight: 600;
}
.map-status-badge.loading {
    background: rgba(59, 130, 246, 0.1); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3);
}
.map-status-badge.success {
    background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3);
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== HERO INDEX ===== */
.hero-index {
    flex: 1;
    height: 420px !important;
    max-height: 420px !important;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-index::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; max-width: 1400px; height: 50%;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    z-index: 0;
    pointer-events: none;
}

.hero-index .u-style-233 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 4px 20px rgba(0,0,0,0.8);
}
.hero-index .u-style-94 {
    color: #ffffff !important;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .hero-index { 
        height: auto !important;
        max-height: none !important;
        min-height: 280px !important;
        aspect-ratio: auto !important;
        align-self: stretch !important; 
        width: 100% !important; 
        padding: 1.75rem 1.25rem 1.5rem !important;
    }
    .hero-index::after {
        height: 100% !important;
        background: linear-gradient(to bottom, rgba(10, 15, 29, 0.4) 0%, rgba(10, 15, 29, 0.8) 50%, rgba(10, 15, 29, 0.96) 100%) !important;
    }
    .hero-index .u-style-138 { font-size: 1.4rem !important; margin-bottom: 0.5rem !important; }
    .hero-index .u-style-94 { font-size: 0.95rem !important; margin-bottom: 1rem !important; line-height: 1.45 !important; }
    .hero-index .u-style-123 { gap: 0.5rem 1rem !important; flex-wrap: wrap !important; }
}

@media (max-width: 640px) {
    .hero-index {
        padding: 1.5rem 1rem 1.25rem !important;
        min-height: auto !important;
    }
    .hero-index .u-style-138 { font-size: 1.25rem !important; line-height: 1.25 !important; }
    .hero-index .u-style-94 { font-size: 0.875rem !important; line-height: 1.4 !important; margin-bottom: 0.75rem !important; }
}

/* =========================================
   CALCULATOR MODERN UI (GLASSMORPHISM)
   ========================================= */

/* Range Slider Moderno (Compacto) */
.modern-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%; max-width: 1400px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  transition: all 0.3s ease;
  accent-color: var(--accent-primary);
}

.modern-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modern-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.8);
}

.modern-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Compact Segmented Controls (Stitch) */
.compact-seg-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.compact-seg-container::-webkit-scrollbar {
  display: none;
}
.compact-seg-btn {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.compact-seg-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.compact-seg-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #d0bcff;
  box-shadow: 0 0 15px rgba(208, 188, 255, 0.1);
}

.compact-seg-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

/* Modern Select Dropdown */
.modern-select {
  text-align: center;
  text-align-last: center;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238b5cf6%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat, repeat;
  background-position: right 1rem top 50%, 0 0;
  background-size: 0.8rem auto, 100%;
}

.modern-select:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* iOS Style Toggle */
.modern-toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.modern-toggle {
  position: relative;
  width: 50px;
  height: 26px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.modern-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

input[type="checkbox"]:checked + .modern-toggle {
  background: var(--accent-primary);
}

input[type="checkbox"]:checked + .modern-toggle::after {
  transform: translateX(24px);
}

/* Glow Result Orb */
.glow-result-container {
  position: relative;
  text-align: center;
  padding: 3rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.glow-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.2;
  filter: blur(40px);
  animation: pulse-glow 4s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes pulse-glow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.3; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
}

.result-content {
  position: relative;
  z-index: 1;
}

/* =========================================
   STITCH AI CALCULATOR DESIGN
   ========================================= */

.stitch-panel {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(76, 215, 246, 0.15);
    border-radius: 1.5rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(76, 215, 246, 0.05), inset 0 0 20px rgba(76, 215, 246, 0.05);
}

.stitch-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #4cd7f6 0%, #004e5c 100%);
    box-shadow: 0 0 15px #4cd7f6;
}

.stitch-panel-dot {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.8);
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.8);
}

.stitch-label {
    font-family: 'Geist', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.stitch-seg-container {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.stitch-seg-container::-webkit-scrollbar {
    display: none;
}

.stitch-seg-btn {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    scroll-snap-align: start;
    flex-shrink: 0;
    white-space: nowrap;
}

.stitch-seg-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stitch-seg-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.1);
}

.stitch-select-wrapper {
    position: relative;
}

.stitch-select {
    width: 100%; max-width: 1400px;
    appearance: none;
    background: #1b1b20;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
    padding-right: 2.5rem;
}

.stitch-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px -10px rgba(167, 139, 250, 0.4);
}

.stitch-select-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.stitch-select-wrapper:focus-within .stitch-select-icon {
    color: var(--accent-primary);
}

.stitch-divider {
    width: 100%; max-width: 1400px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 1.5rem 0;
}

.stitch-orb-container {
    position: relative;
    width: 100%; max-width: 1400px;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.stitch-orb-bg {
    position: absolute;
    inset: 0;
    width: 100%; max-width: 1400px;
    height: 100%;
    opacity: 0.6;
    mix-blend-mode: normal;
    background-image: url('../assets/images/stitch_orb.jpg');
    background-size: cover;
    background-position: center;
}

.stitch-orb-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stitch-orb-title {
    font-family: 'Geist', monospace;
    font-size: 0.75rem;
    color: rgba(167, 139, 250, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.stitch-orb-value {
    font-size: 4rem;
    color: #fff;
    filter: drop-shadow(0 0 25px rgba(167, 139, 250, 0.6));
    line-height: 1;
    margin: 0;
}

.stitch-orb-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ==========================================================================
   STITCH AI WARNING BANNER (Aetheric Precision)
   ========================================================================== */

.stitch-warning {
    position: relative;
    background: rgba(10, 10, 15, 0.7);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 180, 171, 0.15);
    box-shadow: 0 0 40px rgba(255, 180, 171, 0.05), inset 0 0 20px rgba(255, 180, 171, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: var(--text-primary);
}

.stitch-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ffb4ab 0%, #93000a 100%);
    box-shadow: 0 0 15px #ffb4ab;
}

.stitch-warning-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffb4ab;
    font-family: 'Inter', sans-serif;
}

.stitch-warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(147, 0, 10, 0.3);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 180, 171, 0.3);
    color: #ffb4ab;
    box-shadow: 0 0 20px rgba(255, 180, 171, 0.2);
}

.stitch-warning-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    text-transform: uppercase;
}

.stitch-warning-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #e4e1e9;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px dashed rgba(255, 180, 171, 0.1);
}

.stitch-warning-body em {
    color: #ffb4ab;
    font-style: normal;
    font-weight: 600;
}

.stitch-warning-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.stitch-btn-danger {
    background: rgba(147, 0, 10, 0.2);
    color: #ffb4ab;
    border: 1px solid rgba(255, 180, 171, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Pill shape */
    font-family: 'Geist', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stitch-btn-danger:hover {
    background: rgba(147, 0, 10, 0.4);
    box-shadow: 0 0 15px rgba(255, 180, 171, 0.3);
    transform: translateY(-1px);
}

.stitch-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Pill shape */
    font-family: 'Geist', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stitch-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================================
   AETHERIC PRECISION DESIGN SYSTEM
   Standardized components for panels, modals, and warnings.
   ========================================================================= */

/* 1. Base Glass Panel (Overriding previous glass-card) */
.glass-card, .aether-panel {
    background: rgba(31, 31, 37, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 20px rgba(160, 120, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.glass-card:hover, .aether-panel.glow-primary:hover {
    box-shadow: 0 0 30px rgba(160, 120, 255, 0.15);
    border-color: rgba(160, 120, 255, 0.2) !important;
}

/* 3. Warning / Alert Panel (Overriding stitch-warning) */
.stitch-warning, .aether-warning {
    background: rgba(31, 31, 37, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 180, 171, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 20px rgba(255, 180, 171, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
}
.stitch-warning:hover, .aether-warning:hover {
    box-shadow: 0 0 30px rgba(255, 180, 171, 0.15);
}
/* Warning gradient accent */
.stitch-warning::before, .aether-warning::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; max-width: 1400px; height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 180, 171, 0.6), transparent);
}

/* 4. Modal Dialog Standard */
.aether-modal {
    background: rgba(20, 20, 25, 0.75);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(160, 120, 255, 0.1);
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

/* 5. Orbital Status Dot */
.orbital-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: pulse-dot 2s infinite alternate;
}
.orbital-dot.error {
    background: #ffb4ab;
    box-shadow: 0 0 8px #ffb4ab;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 8px var(--accent-primary); }
    100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 15px var(--accent-primary); }
}

/* Safety Warning (Yellow) */
.safety-warning {
    background: rgba(245, 158, 11, 0.05);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 2rem;
}
.safety-warning h3 {
    color: #f59e0b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}
.safety-warning p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
}


/* --- Utility Classes Extracted from Inline Styles --- */
.u-style-1 { animation: spin 2s linear infinite; }
.u-style-2 { background: #4ade80; color: #000; font-weight: bold; padding: 0.5rem 1rem; border-radius: 4px; font-family: var(--font-mono); white-space:nowrap; }
.u-style-3 { background: rgba(0,0,0,0.2); padding: 1rem; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.1); margin-top: 1rem; margin-bottom: 1rem; }
.u-style-4 { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.u-style-5 { background: rgba(239, 68, 68, 0.1); border-left: 4px solid var(--danger-mortal); padding: 1.5rem; border-radius: var(--radius-sm); }
.u-style-6 { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.u-style-7 { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }
.u-style-8 { background: rgba(245, 158, 11, 0.1); border-left: 4px solid #f59e0b; padding: 1.5rem; border-radius: var(--radius-sm); }
.u-style-9 { background: rgba(255,255,255,0.05); padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
.u-style-10 { background: rgba(255,255,255,0.05); padding: 1.5rem; border-radius: 12px; margin: 2rem 0; border-left: 4px solid var(--accent); }
.u-style-11 { background: rgba(255,255,255,0.05); padding: 1.5rem; border-radius: var(--radius-sm); }
.u-style-12 { background: var(--accent-primary); color: #000; font-weight: bold; padding: 0.5rem 1rem; border-radius: 4px; font-family: var(--font-mono); white-space:nowrap; }
.u-style-13 { background: var(--accent-secondary); color: #000; font-weight: bold; padding: 0.5rem 1rem; border-radius: 4px; font-family: var(--font-mono); white-space:nowrap; }
.u-style-14 { background: var(--danger-toxic); color: #000; font-weight: bold; padding: 0.5rem 1rem; border-radius: 4px; font-family: var(--font-mono); white-space:nowrap; }
.u-style-15 { border-color: var(--accent-secondary); color: var(--accent-secondary); }
.u-style-16 { border-left: 4px solid var(--danger-mortal); }
.u-style-17 { border-radius: var(--radius-md);
          overflow: hidden;
          border: 1px solid rgba(255, 255, 255, 0.1); }
.u-style-18 { border-top: 3px dashed #14b8a6; }
.u-style-19 { border-top: 3px dashed #84cc16; }
.u-style-20 { border-top: 3px dashed #d946ef; }
.u-style-21 { border-top: 3px dashed #eab308; }
.u-style-22 { border-top: 3px dashed #f43f5e; }
.u-style-23 { border-top: 3px double #a855f7; }
.u-style-24 { border-top: 3px solid #059669 }
.u-style-25 { border-top: 3px solid #06b6d4 }
.u-style-26 { border-top: 3px solid #10b981 }
.u-style-27 { border-top: 3px solid #10b981; }
.u-style-28 { border-top: 3px solid #14b8a6 }
.u-style-29 { border-top: 3px solid #22c55e }
.u-style-30 { border-top: 3px solid #3b82f6 }
.u-style-31 { border-top: 3px solid #3b82f6; }
.u-style-32 { border-top: 3px solid #6366f1; }
.u-style-33 { border-top: 3px solid #64748b; }
.u-style-34 { border-top: 3px solid #65a30d }
.u-style-35 { border-top: 3px solid #84cc16 }
.u-style-36 { border-top: 3px solid #8b5cf6 }
.u-style-37 { border-top: 3px solid #8b5cf6; }
.u-style-38 { border-top: 3px solid #a855f7 }
.u-style-39 { border-top: 3px solid #dc2626 }
.u-style-40 { border-top: 3px solid #eab308 }
.u-style-41 { border-top: 3px solid #ec4899 }
.u-style-42 { border-top: 3px solid #ec4899; }
.u-style-43 { border-top: 3px solid #f59e0b }
.u-style-44 { border-top: 3px solid #f59e0b; }
.u-style-45 { border-top: 3px solid #f97316 }
.u-style-46 { border-top: 3px solid var(--accent-primary); }
.u-style-47 { border-top: 3px solid var(--accent-secondary); }
.u-style-48 { border-top: 3px solid var(--danger-mortal) }
.u-style-49 { border-top: 3px solid var(--danger-mortal); }
.u-style-50 { border-top: 3px solid var(--potency-low); }
.u-style-51 { border: 0;
      height: 1px;
      background: rgba(255, 255, 255, 0.1);
      margin: 3rem 0; }
.u-style-52 { border: none; background: transparent; padding: 0; }
.u-style-53 { color: #059669 }
.u-style-54 { color: #06b6d4 }
.u-style-55 { color: #10b981 }
.u-style-56 { color: #10b981; margin-bottom: 1rem; }
.u-style-57 { color: #14b8a6 }
.u-style-58 { color: #3b82f6 }
.u-style-59 { color: #65a30d }
.u-style-60 { color: #84cc16 }
.u-style-61 { color: #8b5cf6 }
.u-style-62 { color: #a855f7 }
.u-style-63 { color: #a855f7; }
.u-style-64 { color: #eab308 }
.u-style-65 { color: #ec4899 }
.u-style-66 { color: #f43f5e; }
.u-style-67 { color: #f43f5e; margin-bottom: 1rem; }
.u-style-68 { color: #f97316 }
.u-style-69 { color: #fca5a5; margin-bottom: 0.5rem; font-size: 1.2rem; }
.u-style-70 { color: #fcd34d; margin-bottom: 0.5rem; font-size: 1.2rem; }
.u-style-71 { color: rgba(255,255,255,0.6); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.u-style-72 { color: var(--accent-primary) }
.u-style-73 { color: var(--accent-primary);
            font-size: 2rem; }
.u-style-74 { color: var(--accent-primary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 0.5rem; }
.u-style-75 { color: var(--accent-primary); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; }
.u-style-76 { color: var(--accent-primary); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.u-style-77 { color: var(--accent-primary); font-weight: 500; }
.u-style-78 { color: var(--accent-primary); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.u-style-79 { color: var(--accent-primary); margin-top: 2rem; }
.u-style-80 { color: var(--accent-primary); text-decoration: underline; }
.u-style-81 { color: var(--danger-mortal) }
.u-style-82 { color: var(--danger-non-toxic) }
.u-style-83 { color: var(--danger-toxic) }
.u-style-84 { color: var(--potency-very-high) }
.u-style-85 { color: var(--potency-very-high); border-bottom: 1px solid rgba(239, 68, 68, 0.3); padding-bottom: 0.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.u-style-86 { color: var(--potency-very-high); display: block; margin-bottom: 0.25rem; }
.u-style-87 { color: var(--potency-very-high); font-weight: 600; font-size: 0.9rem; }
.u-style-88 { color: var(--text-muted); font-size: 0.95rem; }
.u-style-89 { color: var(--text-primary); font-weight: bold; margin-bottom: 0.5rem; }
.u-style-90 { color: var(--text-primary); margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; }
.u-style-91 { color: var(--text-primary); margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.u-style-92 { color: var(--text-secondary); }
.u-style-93 { color: var(--text-secondary);
              font-size: 0.9rem; }
.u-style-94 { color: var(--text-secondary); font-style: italic; margin-bottom: 1.5rem; font-size: 1.1rem; }
.u-style-95 { color: var(--text-secondary); margin-left: 0.5rem; font-size: 1rem; }
.u-style-96 { color:red }
.u-style-97 { color:red; }
.u-style-98 { color:var(--accent-primary); }
.u-style-99 { color:var(--accent-primary); margin-bottom: 1rem; }
.u-style-100 { color:var(--accent-primary); margin-top: 2rem; margin-bottom: 1.5rem; }
.u-style-101 { color:var(--primary); font-family:var(--font-mono); margin-bottom: 0.5rem; }
.u-style-102 { color:var(--primary); font-size: 1.8rem; margin-bottom: 1rem; }
.u-style-103 { color:var(--text-muted); font-size: 0.9rem; }
.u-style-104 { color:var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.u-style-105 { color:var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }
.u-style-106 { color:var(--text-secondary); font-size: 0.85rem; }
.u-style-107 { display: block; }
.u-style-108 { display: block; font-weight: 700; margin-bottom: 1rem; color: var(--accent-primary); font-size: 1.1rem; }
.u-style-109 { display: flex;
          align-items: center;
          gap: 1rem;
          margin-bottom: 1rem; }
.u-style-110 { display: flex; align-items: center; background: rgba(0,0,0,0.3); border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.1); padding: 0.5rem 1rem; }
.u-style-111 { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.u-style-112 { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border-left: 4px solid #4ade80; }
.u-style-113 { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border-left: 4px solid #818cf8; }
.u-style-114 { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border-left: 4px solid #f59e0b; }
.u-style-115 { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem; border-left: 4px solid var(--accent-primary); }
.u-style-116 { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.u-style-117 { display: flex; justify-content: center; margin-bottom: 2rem; }
.u-style-118 { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); }
.u-style-119 { display: flex; justify-content: space-between; margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-light); }
.u-style-120 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.u-style-121 { display: inline-block; padding: 0.75rem 1.5rem; text-decoration: none; }
.u-style-122 { display:flex; flex-direction:column; gap:2rem; }
.u-style-123 { display:flex; gap: 1rem; flex-wrap: wrap; }
.u-style-124 { display:grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.u-style-125 { display:grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.u-style-126 { flex: 1; }
.u-style-127 { flex: 1; min-width: 200px; }
.u-style-128 { flex: 1; width: 100%; max-width: 1400px; }
.u-style-129 { font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.u-style-130 { font-size: 0.85rem; color: var(--text-muted); }
.u-style-131 { font-size: 0.8rem; }
.u-style-132 { font-size: 0.9rem; }
.u-style-133 { font-size: 0.9rem; color: var(--text-secondary); max-width: 500px; }
.u-style-134 { font-size: 1.05rem; line-height: 1.6; }
.u-style-135 { font-size: 1.2rem; color: var(--danger-toxic); }
.u-style-136 { font-size: 1.5rem; }
.u-style-137 { font-size: 1.5rem; color: rgba(255,255,255,0.5); font-weight: 400; }
.u-style-138 { font-size: 1.8rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.u-style-139 { font-size: 1rem; vertical-align: middle; margin-right: 0.25rem; }
.u-style-140 { font-size: 3rem; color: rgba(255,255,255,0.2); margin-bottom: 1rem; }
.u-style-141 { font-size: 5rem; color: #fff; margin: 0; line-height: 1; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.u-style-142 { font-style: italic; }
.u-style-143 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.8rem; }
.u-style-144 { list-style-type: none; padding-left: 0; margin-bottom: 1.5rem; }
.u-style-145 { list-style: none; padding-left: 0; }
.u-style-146 { margin-bottom: 0.2rem }
.u-style-147 { margin-bottom: 0.5rem; }
.u-style-148 { margin-bottom: 1.5rem; }
.u-style-149 { margin-bottom: 1.5rem; border-color: rgba(168, 85, 247, 0.3); }
.u-style-150 { margin-bottom: 1.5rem; border-color: rgba(244, 63, 94, 0.3); }
.u-style-151 { margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--text-secondary); }
.u-style-152 { margin-bottom: 1rem; }
.u-style-153 { margin-bottom: 1rem; color: var(--text-secondary); }
.u-style-154 { margin-bottom: 1rem; font-size: 1.2rem; color: var(--text-light); }
.u-style-155 { margin-bottom: 2.5rem; }
.u-style-156 { margin-bottom: 2rem }
.u-style-157 { margin-bottom: 2rem; }
.u-style-158 { margin-bottom: 2rem; color: var(--text-secondary); line-height: 1.6; }
.u-style-159 { margin-bottom: 2rem; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(0,0,0,0.2); border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.05); }
.u-style-160 { margin-bottom: 3rem; }
.u-style-161 { margin-left: auto; font-size: 1rem; }
.u-style-162 { margin-top: 0.5rem; }
.u-style-163 { margin-top: 0.5rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.u-style-164 { margin-top: 0.5rem; line-height: 1.6; color: var(--text-muted); }
.u-style-165 { margin-top: 0.5rem; margin-bottom: 1.5rem; }
.u-style-166 { margin-top: 0; }
.u-style-167 { margin-top: 1.5rem; }
.u-style-168 { margin-top: 1.5rem; color: var(--accent-primary) }
.u-style-169 { margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgba(255,255,255,0.05); border-radius: 999px; border: 1px solid rgba(255,255,255,0.1); }
.u-style-170 { margin-top: 1rem; }
.u-style-171 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block; }
.u-style-172 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #059669; }
.u-style-173 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #06b6d4; }
.u-style-174 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #10b981; }
.u-style-175 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #14b8a6; }
.u-style-176 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #3b82f6; }
.u-style-177 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #65a30d; }
.u-style-178 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #84cc16; }
.u-style-179 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #8b5cf6; }
.u-style-180 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #a855f7; }
.u-style-181 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #eab308; }
.u-style-182 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #ec4899; }
.u-style-183 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: #f97316; }
.u-style-184 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: var(--danger-mortal); }
.u-style-185 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: var(--danger-non-toxic); }
.u-style-186 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: var(--danger-toxic); }
.u-style-187 { margin-top: 1rem;
          padding: 0.5rem 1rem;
          font-size: 0.8rem;
          display: inline-block;
          background: var(--potency-very-high); }
.u-style-188 { margin-top: 1rem; color: var(--text-muted); font-style: italic; }
.u-style-189 { margin-top: 1rem; margin-bottom: 2rem; }
.u-style-190 { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.u-style-191 { margin-top: 2.5rem; }
.u-style-192 { margin-top: 2rem; }
.u-style-193 { margin-top: 2rem; display: grid; gap: 1.5rem; }
.u-style-194 { margin-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; }
.u-style-195 { margin-top:0.5rem; font-size: 0.9rem; }
.u-style-196 { margin-top:0.5rem; font-size:0.9rem; color:var(--text-secondary); }
.u-style-197 { margin-top:0.5rem; margin-bottom: 0.5rem; }
.u-style-198 { margin-top:1.5rem; }
.u-style-199 { margin-top:1.5rem; color:var(--accent-primary); }
.u-style-200 { margin-top:1rem; }
.u-style-201 { margin-top:1rem; padding:0.5rem 1rem; font-size:0.8rem; display:inline-block; background: #f43f5e; color: white; }
.u-style-202 { margin-top:2rem; }
.u-style-203 { margin-top:2rem; border-left: 4px solid #10b981; }
.u-style-204 { margin-top:2rem; color:var(--accent-primary); }
.u-style-205 { margin: 1.5rem 0; display: flex; flex-direction: column; gap: 1rem; }
.u-style-206 { margin: 1.5rem 1.5rem 0 1.5rem; }
.u-style-207 { margin: 2rem 0; }
.u-style-208 { max-width: 800px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.u-style-209 { opacity:0.8; font-weight:normal; }
.u-style-210 { padding-left: 1rem; line-height: 1.7; }
.u-style-211 { padding: 0 2rem 2rem }
.u-style-212 { padding: 0 2rem 2rem; }
.u-style-213 { padding: 0 2rem; }
.u-style-214 { padding: 0 2rem; margin-bottom: 1rem }
.u-style-215 { padding: 0 2rem; margin-bottom: 1rem; margin-top: 1rem }
.u-style-216 { padding: 0 2rem; margin-bottom: 1rem; margin-top: 2rem; }
.u-style-217 { padding: 0 2rem; margin-bottom: 3rem }
.u-style-218 { padding: 0.75rem 2rem; background: rgba(0,0,0,0.4); font-size: 0.85rem; color: var(--text-muted); text-align: center; }
.sidebar-section-label,
.u-style-220,
.u-style-222 {
  padding: 1.15rem 0.75rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  user-select: none;
}
.sidebar-section-label:first-of-type,
.u-style-222 {
  padding-top: 0.4rem;
}
.u-style-223 { padding: 3.5rem 2rem 2.5rem 2rem; border-radius: var(--radius-lg); }
.u-style-224 { padding: 2rem; }
.u-style-225 { padding: 2rem; margin-bottom: 2rem; }
.u-style-226 { padding: 2rem; margin-bottom: 2rem; border-left: 4px solid #f43f5e; }
.u-style-227 { padding: 2rem; }
.u-style-228 { padding: 2rem; line-height: 1.6; color: var(--text-secondary); margin-top: 3rem; }
.u-style-229 { position: absolute; opacity: 0; width: 0; height: 0; }
.u-style-230 { position: absolute; top: 0; left: 0; height: 100%; width: 100%; max-width: 1400px; background: linear-gradient(90deg, var(--danger-mortal) 0%, #f59e0b 25%, #10b981 50%, #3b82f6 100%); opacity: 0.8; }
.u-style-231 { position: absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; object-position: center 30%; opacity: 1; z-index:0; }
.u-style-232 { position: relative; }
.u-style-233 { position:relative; z-index:1; }
.u-style-234 { text-align: center; background: rgba(0,0,0,0.2); padding: 2rem; border-radius: var(--radius-md); border: 1px solid rgba(255,255,255,0.05); }
.u-style-235 { text-align: center; color: var(--accent-primary); }
.u-style-236 { vertical-align: bottom; margin-right: 0.5rem; }
.u-style-237 { vertical-align: middle; font-size: 1.2rem; color: var(--accent-primary); }
.u-style-238 { vertical-align: middle; margin-right: 0.5rem; }
.u-style-239 { white-space: nowrap; padding: 0.75rem 1.5rem; font-weight: bold; }
.u-style-240 { width: 100%; max-width: 1400px;
            display: block;
            object-fit: contain;
            background: #111; }
.u-style-241 { width: 100%; max-width: 1400px; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; position: relative; overflow: hidden; }
.u-style-242 { width: 100%; max-width: 1400px; height: calc(100vh - 350px); min-height: 500px; border-radius: 0; box-shadow: inset 0 10px 20px rgba(0,0,0,0.5); }
.u-style-243 { width: 100%; max-width: 1400px; padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.1); background-color: rgba(20,20,25,0.7); color: var(--text-primary); font-size: 1.1rem; outline: none; transition: all 0.2s; }
.u-style-244 { width: 70px; background: transparent; border: none; color: var(--text-primary); font-size: 1.5rem; font-weight: bold; outline: none; text-align: right; }
.u-style-245 { width:100%; height:200px; object-fit:cover; border-radius:var(--radius-md); opacity: 0.8; margin-bottom: 2rem; }
.u-style-246 { width:100%; max-width: 1000px; height:auto; border-radius:var(--radius-sm); box-shadow: 0 15px 40px rgba(0,0,0,0.6); }

/* --- COSMIC CALCULATOR REDESIGN (Aetheric Precision) --- */

.cosmic-calculator-panel {
    background: rgba(19, 19, 24, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(167, 139, 250, 0.4); /* Lila base */
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem 2.5rem 2rem;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.15), 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.cosmic-calculator-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, #a78bfa, #c084fc, rgba(167, 139, 250, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.pill-radio-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.cosmic-calculator-panel {
    text-align: center;
}

.cosmic-calculator-panel .u-style-108 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.cosmic-calculator-panel .u-style-111 {
    justify-content: center;
}

.pill-radio {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem; font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.pill-radio:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pill-radio.active {
    background: rgba(139, 92, 246, 0.15); /* #8b5cf6 at 15% */
    border-color: #8b5cf6;
    color: #fff;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.pill-radio input[type="radio"] {
    display: none;
}

.result-orb-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0a0a0f;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.result-orb-hero .result-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; max-width: 1400px;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    mix-blend-mode: normal;
    z-index: 0;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
}

.result-orb-hero .result-content {
    position: relative;
    z-index: 1;
}

.result-orb-hero h1 {
    font-family: 'Geist', var(--font-mono);
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
    margin: 0.5rem 0;
}

.result-orb-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==========================================================================
   PERSONAL GALLERY UI
   ========================================================================== */
.personal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.personal-gallery-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.personal-gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.2);
}

.personal-gallery-image-wrapper {
    position: relative;
    width: 100%; max-width: 1400px;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
}

.personal-gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; max-width: 1400px;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.personal-gallery-card:hover .personal-gallery-img {
    transform: scale(1.1);
}

.personal-gallery-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.personal-gallery-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: -0.02em;
}

.personal-gallery-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.personal-gallery-date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--accent-tertiary);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
}

@media (max-width: 768px) {
    .u-style-120, .u-style-124, .u-style-125 {
        grid-template-columns: 1fr;
    }
    .history-section-card { padding: 0.5rem !important; margin-bottom: 1rem !important; }
    .u-style-224 { padding: 1rem !important; }
    .morph-card { padding: 0.75rem !important; }
    .u-style-105 { margin-bottom: 1rem !important; }
    .u-style-204 { margin-top: 1rem !important; }
}

/* SOS Floating Action Button */
.sos-fab {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--danger-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9000;
    transition: transform 0.2s, background-color 0.2s;
}

.sos-fab:hover {
    transform: scale(1.1);
    background-color: #ff5252;
}

.sos-fab .material-symbols-outlined {
    font-size: 28px;
}

@media (max-width: 768px) {
    .sos-fab {
        bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
        left: 1.5rem;
        width: 48px;
        height: 48px;
    }
    .sos-fab .material-symbols-outlined {
        font-size: 24px;
    }
}




/* ===================== CSS GLOSSARY TOOLTIPS ===================== */
[data-tooltip] {
    position: relative;
    cursor: help;
    text-decoration: underline dotted var(--text-muted) 2px;
    text-underline-offset: 4px;
    color: inherit;
    font-weight: inherit;
    outline: none;
    transition: all 0.2s;
    border-radius: 4px;
    padding: 0 2px;
}

[data-tooltip]:hover, [data-tooltip]:focus {
    color: var(--accent-primary);
    text-decoration-color: var(--accent-primary);
    background-color: var(--accent-glow);
}

/* El globo del tooltip */
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    white-space: normal;
    min-width: 200px;
    max-width: 280px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid var(--glass-border);
    z-index: 999999;
    
    /* Animación */
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

/* La flechita del globo */
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(140% - 6px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px;
    border-style: solid;
    border-color: var(--bg-secondary) transparent transparent transparent;
    z-index: 999999;
    
    /* Animación */
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

/* Mostrar tooltip al hacer hover (PC) o focus (Móvil) */
[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus::after,
[data-tooltip]:focus::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.interaction-alert.alert-info {
  background: rgba(59, 130, 246, 0.05); /* Tailwind Blue 500 */
  border-left: 4px solid #3b82f6;
}
.interaction-alert-title.text-info {
  color: #93c5fd; /* Tailwind Blue 300 */
}

/* ============================================
   Semantic Interaction Alerts (A11y & UI Fix)
   ============================================ */
.interaction-alert {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-normal);
}
.interaction-alert:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.interaction-alert.alert-danger {
  background: rgba(220, 38, 38, 0.06);
  border-left: 4px solid var(--danger-mortal);
}
.interaction-alert.alert-warning {
  background: rgba(249, 115, 22, 0.06);
  border-left: 4px solid var(--danger-toxic);
}
.interaction-alert.alert-info {
  background: rgba(59, 130, 246, 0.06);
  border-left: 4px solid #3b82f6;
}
.interaction-alert-title {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.interaction-alert-title.text-danger {
  color: #fca5a5;
}
.interaction-alert-title.text-warning {
  color: #fcd34d;
}
.interaction-alert-title.text-info {
  color: #93c5fd;
}

/* ===== LEGAL FOOTER ===== */
.legal-footer-container {
    width: 100%;
    margin: 0;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 10;
}
.legal-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    border-right: 1px solid var(--glass-border);
    padding-right: 2rem;
    color: var(--text-muted);
}
.legal-footer-brand .material-symbols-outlined {
    font-size: 28px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}
.legal-footer-brand span {
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    opacity: 0.8;
}
.legal-footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    opacity: 0.85;
}
@media (max-width: 768px) {
    .legal-footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem 1rem;
    }
    .legal-footer-brand {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-right: 0;
        padding-bottom: 1rem;
        width: 100%; max-width: 1400px;
    }
}




/* ===== MEDICINAL BADGES (HIGH CONTRAST) ===== */
.badge-med-green { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.6); }
.badge-med-blue { background: rgba(59, 130, 246, 0.25); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.6); }
.badge-med-purple { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.6); }
.badge-med-pink { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; border: 1px solid rgba(236, 72, 153, 0.6); }
.badge-med-cyan { background: rgba(6, 182, 212, 0.2); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.6); }

/* ============================================================
   GLOBAL SEARCH MODAL (⌘K / QUICK FINDER)
   ============================================================ */
.topbar-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-family: var(--font-body);
}
.topbar-search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
}
.topbar-search-icon {
    font-size: 1.15rem;
    color: var(--accent);
}
.topbar-search-kbd {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    font-family: inherit;
    color: var(--text-muted);
}
@media (max-width: 600px) {
    .topbar-search-text,
    .topbar-search-kbd {
        display: none;
    }
    .topbar-search-btn {
        padding: 0.35rem 0.5rem;
    }
}

/* Sidebar Search Button */
.sidebar-search-trigger {
    margin: 0.5rem 0.75rem 1rem 0.75rem;
}
.sidebar-search-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}
.sidebar-search-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    color: var(--text-primary);
}
.sidebar-search-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal Overlay & Container */
.global-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: min(10vh, 90px);
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
    overflow-y: auto;
}
.global-search-container {
    width: 100%;
    max-width: 680px;
    background: rgba(18, 20, 29, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    max-height: 82vh;
}

/* Header & Input */
.search-input-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.search-input-icon {
    font-size: 1.5rem;
    color: var(--accent);
    flex-shrink: 0;
}
.global-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-body);
}
.global-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}
.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 4px;
    transition: color 0.2s;
}
.search-clear-btn:hover {
    color: var(--text-primary);
}
.search-kbd-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.search-kbd-badge:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

/* Filter Pills */
.search-filter-pills {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(0, 0, 0, 0.25);
}
.search-filter-pills::-webkit-scrollbar {
    display: none;
}
.search-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
    font-family: var(--font-body);
}
.search-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
.search-pill.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border-color: var(--accent);
}

/* Results List */
.search-results-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    max-height: 55vh;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.search-result-item:hover,
.search-result-item.selected {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}
.search-item-media {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-item-icon {
    font-size: 1.5rem;
    color: var(--accent);
}
.search-item-info {
    flex: 1;
    min-width: 0;
}
.search-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.search-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item-title.italic {
    font-style: italic;
}
.search-item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}
.search-item-common {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item-action {
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    color: var(--accent);
    display: flex;
    align-items: center;
}
.search-result-item:hover .search-item-action,
.search-result-item.selected .search-item-action {
    opacity: 1;
    transform: translateX(0);
}

/* Category Badges in Search */
.badge-search-psilo { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.4); font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px; }
.badge-search-strain { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; border: 1px solid rgba(236, 72, 153, 0.4); font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px; }
.badge-search-med { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.4); font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px; }
.badge-search-edible { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px; }
.badge-search-sec { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); font-size: 0.7rem; padding: 0.1rem 0.45rem; border-radius: 4px; }

/* Empty State */
.search-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}
.search-empty-state .empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.4;
    margin-bottom: 0.75rem;
}
.search-empty-state .empty-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.search-empty-state .empty-query {
    font-weight: 600;
    color: var(--accent);
}
.search-empty-state .empty-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal Footer */
.search-modal-footer {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.65rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    font-size: 0.75rem;
    color: var(--text-muted);
}
.search-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.search-hint kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    color: var(--text-primary);
}

/* ============================================================
   DOUBLE DASHBOARD (MUSHROOM HUB - 4 GALLERIES)
   ============================================================ */
.hub-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}
@media (max-width: 1120px) {
    .hub-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}
@media (max-width: 640px) {
    .hub-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}
.hub-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: rgba(17, 17, 24, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hub-card:hover {
    transform: translateY(-6px);
}

/* Category Accent Glows */
.hub-card.hub-psilo:hover {
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 28px rgba(6, 182, 212, 0.25);
}
.hub-card.hub-strain:hover {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 28px rgba(236, 72, 153, 0.25);
}
.hub-card.hub-med:hover {
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 28px rgba(168, 85, 247, 0.25);
}
.hub-card.hub-edible:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 28px rgba(16, 185, 129, 0.25);
}

/* Media Viewport (Cuadrada 1:1 para evitar fotos estiradas) */
.hub-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #0a0a0f;
}
@media (max-width: 1120px) and (min-width: 641px) {
    .hub-card-media {
        aspect-ratio: 4 / 3;
        max-height: 320px;
    }
}
@media (max-width: 640px) {
    .hub-card-media {
        aspect-ratio: 4 / 3;
        max-height: 280px;
    }
}
.hub-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
.hub-card:hover .hub-card-media img {
    transform: scale(1.03);
}
.hub-card-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 50%, rgba(17,17,24,0.95) 100%);
    pointer-events: none;
}
.hub-card-media-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    z-index: 2;
    pointer-events: none;
}
.hub-media-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.hub-media-badge .material-symbols-outlined {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}
.hub-count-badge {
    background: rgba(10, 10, 15, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f1f5f9;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.28rem 0.6rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    white-space: nowrap;
}

/* Card Body */
.hub-card-body {
    padding: 1.25rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: linear-gradient(180deg, rgba(17, 17, 24, 0.96) 0%, rgba(12, 12, 18, 0.99) 100%);
}
.hub-card-body-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
    gap: 0.4rem;
}
.hub-card-sublabel {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.hub-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}
.hub-card-desc {
    font-size: 0.83rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    flex: 1;
}
.hub-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
}
.hub-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.hub-chip-featured {
    background: rgba(236, 72, 153, 0.12);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.28);
    font-weight: 600;
}
.hub-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    gap: 0.4rem;
}
.hub-card-meta {
    font-size: 0.74rem;
    color: var(--text-muted);
}
.hub-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.25s ease;
    white-space: nowrap;
}
.hub-psilo .hub-card-btn {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}
.hub-strain .hub-card-btn {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.3);
}
.hub-med .hub-card-btn {
    color: #c084fc;
    border-color: rgba(192, 132, 252, 0.3);
}
.hub-edible .hub-card-btn {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}
.hub-card:hover .hub-card-btn {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}
.hub-psilo:hover .hub-card-btn { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; }
.hub-strain:hover .hub-card-btn { background: rgba(244, 114, 182, 0.15); border-color: #f472b6; }
.hub-med:hover .hub-card-btn { background: rgba(192, 132, 252, 0.15); border-color: #c084fc; }
.hub-edible:hover .hub-card-btn { background: rgba(52, 211, 153, 0.15); border-color: #34d399; }

/* ============================================================
   TWIN CARD (RECIPROCAL MEDICINAL <-> COMESTIBLE SYNERGY)
   ============================================================ */
.twin-badge-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    text-decoration: none;
    transition: all 0.25s ease;
}
.twin-badge-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
}
.twin-badge-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.twin-badge-icon {
    font-size: 2rem;
    color: #a855f7;
    flex-shrink: 0;
}
.twin-badge-content h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}
.twin-badge-content p {
    margin: 0.2rem 0 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.twin-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c084fc;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .hub-card-media {
        height: auto;
        aspect-ratio: 1 / 1;
        max-height: 280px;
    }
    .hub-card-media-badges {
        top: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }
    .hub-media-badge, .hub-count-badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.55rem;
    }
    .hub-card-body {
        padding: 1.25rem 1rem;
    }
    .hub-card-title {
        font-size: 1.25rem;
    }
    .hub-card-chips {
        gap: 0.35rem;
    }
    .hub-chip {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }
    .twin-badge-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }
    .twin-badge-btn {
        align-self: flex-end;
    }
}


