
    /* ==========================================================================
       CSS VARIABLES & RESET (Dark Forest Luxury Theme)
       ========================================================================== */
    :root {
      --bg-deep: #070d0a;
      --bg-surface: #0e1a14;
      --bg-card: rgba(18, 33, 26, 0.72);
      --bg-card-hover: rgba(24, 44, 35, 0.88);
      --card-border: rgba(255, 255, 255, 0.08);
      --card-border-hover: rgba(52, 211, 153, 0.4);
      
      --accent-emerald: #10b981;
      --accent-emerald-light: #34d399;
      --accent-emerald-dark: #059669;
      --accent-amber: #f59e0b;
      --accent-amber-light: #fbbf24;
      
      --text-main: #f0fdf4;
      --text-muted: #94a3b8;
      --text-subtle: #64748b;
      --text-accent: #a7f3d0;
      
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 20px;
      --radius-xl: 28px;
      
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
      --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
      --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
      --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);

      --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background-color: var(--bg-deep);
      color: var(--text-main);
      line-height: 1.55;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    /* Subtle forest canopy ambient glow */
    body::before {
      content: "";
      position: fixed;
      top: -200px;
      left: 50%;
      transform: translateX(-50%);
      width: 1000px;
      height: 500px;
      background: radial-gradient(ellipse, rgba(16, 185, 129, 0.12) 0%, rgba(6, 78, 59, 0.05) 50%, transparent 75%);
      pointer-events: none;
      z-index: 0;
    }

    /* Scrollbar Styling */
    ::-webkit-scrollbar {
      width: 8px;
    }
    ::-webkit-scrollbar-track {
      background: var(--bg-deep);
    }
    ::-webkit-scrollbar-thumb {
      background: #1a382b;
      border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--accent-emerald-dark);
    }

    /* ==========================================================================
       TOP NAVIGATION BAR
       ========================================================================== */
    .site-header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(7, 13, 10, 0.88);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--card-border);
      padding: 0 1.5rem;
    }

    .header-container {
      max-width: 1400px;
      margin: 0 auto;
      height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
    }

    .brand-group {
      display: flex;
      align-items: center;
      gap: 0.9rem;
      text-decoration: none;
      color: inherit;
    }

    .brand-icon-box {
      width: 44px;
      height: 44px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, var(--accent-emerald) 0%, #047857 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #022314;
      box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
      flex-shrink: 0;
    }

    .brand-icon-box svg {
      width: 24px;
      height: 24px;
    }

    .brand-title {
      font-size: 1.25rem;
      font-weight: 800;
      letter-spacing: -0.01em;
      color: #ffffff;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .brand-badge {
      font-size: 0.65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(16, 185, 129, 0.15);
      color: var(--accent-emerald-light);
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .brand-subtitle {
      font-size: 0.75rem;
      color: var(--text-accent);
      opacity: 0.7;
      font-weight: 500;
    }

    .view-toggle-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.55rem 1.1rem;
      border-radius: var(--radius-md);
      font-size: 0.82rem;
      font-weight: 600;
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-accent);
      border: 1px solid var(--card-border);
      cursor: pointer;
      transition: all var(--transition-fast);
    }

    .view-toggle-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(52, 211, 153, 0.3);
    }

    .view-toggle-btn svg {
      width: 16px;
      height: 16px;
    }

    /* ==========================================================================
       HERO & CONTROL TOOLBAR
       ========================================================================== */
    .hero-section {
      position: relative;
      z-index: 1;
      padding: 2.75rem 1.5rem 2rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.05);
      text-align: center;
    }

    .hero-inner {
      max-width: 900px;
      margin: 0 auto;
    }

    .hero-tag {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.3rem 0.85rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 600;
      background: rgba(16, 185, 129, 0.12);
      color: var(--accent-emerald-light);
      border: 1px solid rgba(16, 185, 129, 0.25);
      margin-bottom: 1.25rem;
    }

    .hero-tag svg {
      width: 14px;
      height: 14px;
    }

    .hero-title {
      font-size: clamp(1.8rem, 3.8vw, 2.75rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #ffffff;
      line-height: 1.2;
      margin-bottom: 0.85rem;
    }

    .hero-desc {
      font-size: clamp(0.85rem, 1.2vw, 1.02rem);
      color: var(--text-muted);
      max-width: 680px;
      margin: 0 auto 2.25rem;
      font-weight: 400;
    }

    .controls-panel {
      background: rgba(14, 26, 20, 0.8);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-xl);
      padding: 0.75rem;
      box-shadow: var(--shadow-md);
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      max-width: 960px;
      margin: 0 auto;
    }

    .search-box {
      position: relative;
      width: 100%;
    }

    .search-icon {
      position: absolute;
      left: 1rem;
      top: 50%;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
      color: var(--text-subtle);
      pointer-events: none;
    }

    .search-input {
      width: 100%;
      height: 48px;
      padding: 0 1rem 0 2.8rem;
      background: rgba(7, 13, 10, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.09);
      border-radius: var(--radius-md);
      color: #ffffff;
      font-size: 0.9rem;
      font-family: inherit;
      outline: none;
      transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }

    .search-input:focus {
      border-color: var(--accent-emerald);
      box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    }

    .search-input::placeholder {
      color: rgba(148, 163, 184, 0.5);
    }

    .filter-chips {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      overflow-x: auto;
      padding-bottom: 0.25rem;
      scrollbar-width: none;
    }
    .filter-chips::-webkit-scrollbar {
      display: none;
    }

    .chip-btn {
      padding: 0.55rem 1rem;
      border-radius: var(--radius-md);
      font-size: 0.78rem;
      font-weight: 600;
      border: 1px solid var(--card-border);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-muted);
      cursor: pointer;
      white-space: nowrap;
      transition: all var(--transition-fast);
    }

    .chip-btn:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
      border-color: rgba(255, 255, 255, 0.15);
    }

    .chip-btn.active {
      background: var(--accent-emerald);
      color: #022314;
      font-weight: 700;
      border-color: var(--accent-emerald);
      box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    }

    /* ==========================================================================
       MAIN CONTENT & GRID ARCHITECTURE
       ========================================================================== */
    .main-container {
      max-width: 1400px;
      margin: 0 auto;
      padding: 2rem 1.5rem 4rem;
      flex-grow: 1;
      width: 100%;
      position: relative;
      z-index: 1;
    }

    .status-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 1.5rem;
      font-size: 0.8rem;
      color: var(--text-subtle);
      font-weight: 600;
    }

    .status-counter {
      color: var(--accent-emerald-light);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .status-hint {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      color: var(--text-muted);
    }

    .status-hint svg {
      width: 14px;
      height: 14px;
      color: var(--accent-amber);
    }

    /* Robust CSS Grid with strict equal card heights */
    .birds-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
      gap: 1.75rem;
      align-items: stretch;
    }

    .birds-grid.list-view {
      grid-template-columns: 1fr;
      max-width: 900px;
      margin: 0 auto;
    }

    /* ==========================================================================
       BIRD CARD COMPONENT
       ========================================================================== */
    .bird-card {
      background: var(--bg-card);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--card-border);
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
      box-shadow: var(--shadow-sm);
      position: relative;
    }

    .bird-card:hover {
      transform: translateY(-4px);
      border-color: var(--card-border-hover);
      box-shadow: var(--shadow-md), var(--shadow-glow);
      background: var(--bg-card-hover);
    }

    /* Artwork Canvas Container */
    .card-art-box {
      position: relative;
      width: 100%;
      height: 220px;
      background: #060e0a;
      overflow: hidden;
      cursor: pointer;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .card-art-box svg {
      width: 100%;
      height: 100%;
      display: block;
      transition: transform 0.4s ease;
    }

    .bird-card:hover .card-art-box svg {
      transform: scale(1.03);
    }

    .habitat-tag {
      position: absolute;
      top: 0.85rem;
      left: 0.85rem;
      background: rgba(7, 13, 10, 0.8);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(52, 211, 153, 0.3);
      color: var(--accent-emerald-light);
      font-size: 0.7rem;
      font-weight: 700;
      padding: 0.3rem 0.7rem;
      border-radius: 999px;
      z-index: 2;
    }

    .expand-btn-icon {
      position: absolute;
      top: 0.85rem;
      right: 0.85rem;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: rgba(7, 13, 10, 0.7);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      opacity: 0.75;
      transition: opacity var(--transition-fast), transform var(--transition-fast);
      z-index: 2;
    }

    .card-art-box:hover .expand-btn-icon {
      opacity: 1;
      transform: scale(1.08);
      color: var(--accent-emerald-light);
    }

    .expand-btn-icon svg {
      width: 15px;
      height: 15px;
    }

    .audio-btn {
      position: absolute;
      bottom: 0.85rem;
      right: 0.85rem;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.4rem 0.85rem;
      border-radius: 999px;
      background: var(--accent-emerald);
      color: #022314;
      font-size: 0.72rem;
      font-weight: 700;
      border: none;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
      transition: all var(--transition-fast);
    }

    .audio-btn:hover {
      background: var(--accent-emerald-light);
      transform: scale(1.04);
    }

    .audio-btn.playing {
      background: var(--accent-amber);
      color: #1a0f00;
      animation: pulse-audio 0.7s infinite alternate;
    }

    @keyframes pulse-audio {
      from { transform: scale(1); }
      to { transform: scale(1.06); }
    }

    .audio-btn svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    /* Card Content Area */
    .card-body {
      padding: 1.25rem;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
    }

    .card-header-meta {
      margin-bottom: 0.9rem;
    }

    .card-bird-name {
      font-size: 1.28rem;
      font-weight: 700;
      color: #ffffff;
      line-height: 1.25;
      margin-bottom: 0.2rem;
    }

    .card-latin-taxo {
      font-size: 0.78rem;
      font-style: italic;
      color: var(--accent-emerald-light);
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    }

    /* Inner Tabs Navigation */
    .card-tab-nav {
      display: flex;
      background: rgba(7, 13, 10, 0.7);
      padding: 3px;
      border-radius: var(--radius-sm);
      border: 1px solid rgba(255, 255, 255, 0.06);
      margin-bottom: 1.1rem;
      gap: 3px;
    }

    .tab-trigger {
      flex: 1;
      padding: 0.45rem 0.5rem;
      font-size: 0.74rem;
      font-weight: 600;
      border-radius: 6px;
      border: none;
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      transition: all var(--transition-fast);
    }

    .tab-trigger:hover {
      color: #ffffff;
    }

    .tab-trigger.active {
      background: rgba(16, 185, 129, 0.2);
      color: var(--accent-emerald-light);
      font-weight: 700;
      border: 1px solid rgba(16, 185, 129, 0.35);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

    .tab-trigger svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }

    /* Tab Panes */
    .tab-pane {
      display: none;
      flex-direction: column;
      flex-grow: 1;
      gap: 0.85rem;
      font-size: 0.82rem;
    }

    .tab-pane.active {
      display: flex;
    }

    .bird-narrative {
      color: rgba(240, 253, 244, 0.88);
      font-size: 0.82rem;
      line-height: 1.55;
    }

    /* Metric Key-Value Badges */
    .metrics-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.55rem;
      margin: 0.25rem 0;
    }

    .metric-badge {
      background: rgba(7, 13, 10, 0.5);
      border: 1px solid rgba(255, 255, 255, 0.05);
      border-radius: var(--radius-sm);
      padding: 0.45rem 0.65rem;
    }

    .metric-label {
      display: block;
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--text-subtle);
      font-weight: 700;
    }

    .metric-val {
      font-size: 0.85rem;
      font-weight: 600;
      color: #ffffff;
    }

    .factoid-box {
      margin-top: auto;
      background: rgba(16, 185, 129, 0.08);
      border: 1px solid rgba(16, 185, 129, 0.2);
      border-radius: var(--radius-sm);
      padding: 0.6rem 0.75rem;
      display: flex;
      gap: 0.55rem;
      align-items: flex-start;
      font-size: 0.77rem;
      color: var(--text-accent);
      line-height: 1.45;
    }

    .factoid-box svg {
      width: 16px;
      height: 16px;
      color: var(--accent-amber);
      flex-shrink: 0;
      margin-top: 1px;
    }

    /* Anatomy Tab Specifics */
    .anatomy-preview-wrap {
      width: 100%;
      height: 160px;
      background: #060e0a;
      border-radius: var(--radius-sm);
      border: 1px solid rgba(255, 255, 255, 0.06);
      overflow: hidden;
      cursor: pointer;
    }

    .anatomy-preview-wrap svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .anatomy-markers-list {
      background: rgba(7, 13, 10, 0.5);
      border-radius: var(--radius-sm);
      padding: 0.75rem;
      border: 1px solid rgba(255, 255, 255, 0.05);
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }

    .marker-item {
      display: flex;
      align-items: flex-start;
      gap: 0.45rem;
      font-size: 0.77rem;
      color: rgba(240, 253, 244, 0.85);
    }

    .marker-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent-emerald);
      margin-top: 5px;
      flex-shrink: 0;
    }

    /* ==========================================================================
       EMPTY RESULTS STATE
       ========================================================================== */
    .empty-state {
      grid-column: 1 / -1;
      text-align: center;
      padding: 4rem 1.5rem;
      background: var(--bg-card);
      border: 1px dashed var(--card-border);
      border-radius: var(--radius-lg);
    }

    .empty-state svg {
      width: 48px;
      height: 48px;
      color: var(--accent-emerald);
      opacity: 0.4;
      margin-bottom: 1rem;
    }

    .empty-state h3 {
      font-size: 1.25rem;
      color: #ffffff;
      margin-bottom: 0.5rem;
    }

    .empty-state p {
      color: var(--text-muted);
      font-size: 0.85rem;
    }

    /* ==========================================================================
       FULLSCREEN MODAL VIEWER
       ========================================================================== */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 100;
      background: rgba(4, 9, 6, 0.92);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
      opacity: 0;
      transition: opacity 0.25s ease;
    }

    .modal-backdrop.open {
      display: flex;
      opacity: 1;
    }

    .modal-window {
      background: var(--bg-surface);
      border: 1px solid var(--card-border-hover);
      border-radius: var(--radius-xl);
      max-width: 820px;
      width: 100%;
      overflow: hidden;
      box-shadow: var(--shadow-lg), 0 0 50px rgba(16, 185, 129, 0.25);
      position: relative;
      animation: modal-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes modal-enter {
      from { transform: scale(0.95); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .modal-close-btn {
      position: absolute;
      top: 1rem;
      right: 1rem;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(7, 13, 10, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      z-index: 10;
      transition: all var(--transition-fast);
    }

    .modal-close-btn:hover {
      background: var(--accent-emerald);
      color: #022314;
      transform: rotate(90deg);
    }

    .modal-close-btn svg {
      width: 18px;
      height: 18px;
    }

    .modal-art-stage {
      width: 100%;
      height: clamp(280px, 45vh, 400px);
      background: #040906;
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .modal-art-stage svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .modal-details-body {
      padding: 1.5rem;
    }

    .modal-header-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 0.75rem;
      flex-wrap: wrap;
    }

    .modal-title {
      font-size: 1.5rem;
      font-weight: 800;
      color: #ffffff;
    }

    .modal-latin {
      font-size: 0.9rem;
      font-style: italic;
      color: var(--accent-emerald-light);
      font-family: ui-monospace, monospace;
    }

    .modal-text {
      font-size: 0.88rem;
      color: rgba(240, 253, 244, 0.85);
      line-height: 1.6;
      margin-bottom: 1rem;
    }

    .modal-badges-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 0.65rem;
    }

    /* ==========================================================================
       FOOTER
       ========================================================================== */
    .site-footer {
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      background: rgba(7, 13, 10, 0.95);
      padding: 2rem 1.5rem;
      margin-top: auto;
      font-size: 0.78rem;
      color: var(--text-subtle);
    }

    .footer-inner {
      max-width: 1400px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 1rem;
    }

    .footer-note {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      color: var(--text-muted);
    }

    .footer-note svg {
      width: 14px;
      height: 14px;
      color: var(--accent-emerald);
    }

    /* ==========================================================================
       RESPONSIVE BREAKPOINTS
       ========================================================================== */
    @media (max-width: 768px) {
      .header-container {
        height: auto;
        padding: 0.85rem 0;
      }
      .brand-subtitle {
        display: none;
      }
      .birds-grid {
        grid-template-columns: 1fr;
      }
      .card-art-box {
        height: 200px;
      }
      .hero-section {
        padding: 2rem 1rem 1.5rem;
      }
    }
  
