/* ============================================
   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: #6b6b80;
  --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;
}
.sidebar-header { margin-bottom: 2.5rem; cursor: pointer; padding: 0 0.5rem; }
.sidebar-title { font-size: 1.5rem; color: var(--text-primary); font-family: var(--font-display); }
.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; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.04em;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.sidebar-link:hover { background: rgba(167,139,250,0.08); color: var(--text-primary); }
.sidebar-link.active { background: rgba(167,139,250,0.12); color: var(--accent-primary); font-weight: 700; border-right: 3px solid var(--accent-primary); }
.sidebar-link .material-symbols-outlined { font-size: 20px; }
.sidebar-subnav { display: flex; flex-direction: column; gap: 0.15rem; padding-left: 2.25rem; margin-top: -0.2rem; margin-bottom: 0.5rem; list-style: none; overflow: hidden; }
.sidebar-sublink { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.75rem; transition: all var(--transition-fast); text-decoration: none; }
.sidebar-sublink:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.sidebar-sublink.active { color: var(--accent-primary); font-weight: 600; background: rgba(167,139,250,0.05); }
.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.6); z-index: 45; }
.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: 50; padding: 2rem 1rem; overflow-y: auto;
}
.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: 30;
  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-brand { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-primary); font-weight: 600; }
.topbar-desktop { display: flex; flex: 1; align-items: center; gap: 3rem; }
.topbar-title { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.12em; color: var(--text-primary); cursor: pointer; font-weight: 600; white-space: nowrap; }
.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: 2.5rem; }
.hero-img { width: 100%; max-width: 1400px; height: 320px; object-fit: cover; opacity: 0.35; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-primary) 0%, rgba(10,10,15,0.5) 50%, transparent 100%); }
.hero-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 1rem; }
.hero-text p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; }

/* ===== 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; 
    text-align: center; 
    cursor: pointer;
    position: relative;
    border: none !important;
}
.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(-2px); box-shadow: 0 8px 32px rgba(167, 139, 250, 0.15); }
.stat-card:hover::before { background: linear-gradient(135deg, rgba(167, 139, 250, 1) 0%, rgba(124, 58, 237, 0.5) 100%); }

.stat-number { display: block; font-size: 2.5rem; font-weight: 700; color: var(--accent-primary); font-family: var(--font-display); }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem; }
@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; }
.volume-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px var(--accent-glow-strong); border-color: var(--accent-glow-strong); }
.volume-card img { width: 100%; max-width: 1400px; height: 160px; object-fit: cover; object-position: center 40%; opacity: 0.6; transition: opacity var(--transition-normal); }
.volume-card:hover img { opacity: 0.8; }
.volume-info { padding: 1.25rem; }
.volume-info h3 { font-size: 1rem; color: var(--text-primary); margin-bottom: 0.35rem; }
.volume-info p { font-size: 0.85rem; color: var(--text-muted); }
@media (max-width: 768px) { .volumes-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .volume-card img { height: 240px; } }
@media (min-width: 1025px) { .volume-card img { height: 220px; } }

/* ===== 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 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 { 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); }

/* ===== 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.7) 0%, transparent 60%); }
.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: 100;
  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; }
.modal-title { font-size: 1.5rem; font-style: italic; margin-bottom: 0.15rem; }
.modal-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.modal-close {
  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 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 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: 280px; flex-shrink: 0; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cultivation-nav h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.75rem; padding-left: 1rem; }
.cultivation-nav button { display: flex; align-items: center; gap: 0.75rem; background: transparent; border: none; padding: 0.75rem 1rem; color: var(--text-secondary); text-align: left; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); }
.cultivation-nav button .material-symbols-outlined { font-size: 20px; opacity: 0.7; }
.cultivation-nav button:hover { background: rgba(255,255,255,0.03); color: var(--text-primary); }
.cultivation-nav button.active { background: rgba(167,139,250,0.1); color: var(--accent-primary); box-shadow: inset 3px 0 0 var(--accent-primary); }
.cultivation-nav button.active .material-symbols-outlined { opacity: 1; color: var(--accent-primary); }

.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: 900px) {
    .cultivation-layout { flex-direction: column; gap: 1rem; }
    .cultivation-nav { width: 100%; max-width: 1400px; position: relative; top: 0; flex-direction: column; padding: 1rem; gap: 0.5rem; }
    .cultivation-nav button, .cultivation-nav .sidebar-link { width: 100%; max-width: 1400px; white-space: normal; height: auto; text-align: left; }
    .cultivation-nav h3 { width: 100%; max-width: 1400px; }
    .cultivation-content { 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;
}

/* 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);
}


@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: 70%;
    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: 900px) {
    .hero-index { 
        height: auto !important;
        max-height: none !important;
        aspect-ratio: 3 / 2 !important; /* Proporcion rectangular clasica con mas margen vertical */
        align-self: stretch !important; 
        width: 100% !important; 
        padding: 1.25rem !important; /* Reducimos ligerisimamente el padding para dar mas aire al texto */
    }
    .hero-index .u-style-138 { font-size: 1.5rem !important; margin-bottom: 0.5rem !important; }
    .hero-index .u-style-94 { font-size: 1rem !important; margin-bottom: 1rem !important; line-height: 1.4 !important; }
    .hero-index .u-style-123 { gap: 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; }
.u-style-219 { padding: 0.8rem; }
.u-style-220 { padding: 1.5rem 1.5rem 0.5rem; font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.05em; }
.u-style-221 { padding: 1.5rem; }
.u-style-222 { padding: 1rem 1.5rem 0.5rem; font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.05em; }
.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: 0.9; 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: 0.9;
    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: 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;
    }
}


