/* ── CYBERNETIC RESEARCH THEME ── */
/* Modern Dark-First Design for AGI/ASI Documentation */

/* ── COLOR PALETTE (Tailwind Slate Theme) ── */
:root {
  /* Slate Background Colors */
  --cyber-bg: #0f172a;              /* slate-900 */
  --cyber-bg-secondary: #1e293b;    /* slate-800 */
  --cyber-bg-tertiary: #334155;     /* slate-700 */
  --cyber-bg-card: #1e293b;         /* slate-800 */
  --cyber-bg-card-hover: #334155;   /* slate-700 */
  
  /* Slate Text Colors */
  --cyber-text-primary: #e2e8f0;    /* slate-200 */
  --cyber-text-secondary: #94a3b8;  /* slate-400 */
  --cyber-text-muted: #64748b;      /* slate-500 */
  
  /* Slate Border Colors */
  --cyber-border: #334155;          /* slate-700 */
  --cyber-border-light: #475569;    /* slate-600 */
  
  /* Accent Colors (Azure & Teal) */
  --cyber-accent-blue: #3b82f6;     /* blue-500 */
  --cyber-accent-blue-light: #60a5fa; /* blue-400 */
  --cyber-accent-teal: #2dd4bf;     /* teal-400 */
  --cyber-accent-teal-light: #2dd4bf; /* teal-400 */
  
  /* Additional Accent Colors */
  --cyber-accent-purple: #a855f7;   /* purple-500 */
  --cyber-accent-green: #22c55e;     /* green-500 */
  --cyber-accent-orange: #f97316;    /* orange-500 */
  --cyber-accent-red: #ef4444;       /* red-500 */
  
  /* Glow Effects */
  --cyber-glow-blue: rgba(59, 130, 246, 0.5);
  --cyber-glow-teal: rgba(45, 212, 191, 0.5);
  --cyber-glow-purple: rgba(168, 85, 247, 0.5);
  
  /* Glassmorphism */
  --cyber-glass: rgba(15, 23, 42, 0.8);
}

/* ── GLOBAL STYLES ── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--cyber-bg);
  color: var(--cyber-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Ensure theme is applied to all MkDocs elements */
.md-container {
  background-color: var(--cyber-bg);
}

.md-main {
  background-color: var(--cyber-bg);
}

.md-content {
  background-color: var(--cyber-bg);
}

/* Ensure content is visible */
article {
  display: block;
  visibility: visible;
}

/* ── MAIN CONTENT SPACING ── */
.md-main {
  padding-top: 1rem;
}

.md-content {
  padding-top: 1rem;
}

/* ── TYPOGRAPHY (Tailwind Specifications) ── */
.md-typeset h1 {
  font-size: 2.25rem; /* text-4xl equivalent */
  font-weight: 700;
  line-height: 1.3;
  color: var(--cyber-text-primary);
  margin: 2rem 0 1rem;
}

.md-typeset h2 {
  font-size: 1.5rem; /* text-2xl equivalent */
  font-weight: 600;
  line-height: 1.3;
  color: var(--cyber-text-primary);
  margin: 1.75rem 0 0.75rem;
}

.md-typeset h3 {
  font-size: 1.25rem; /* text-xl equivalent */
  font-weight: 600;
  line-height: 1.3;
  color: var(--cyber-text-primary);
  margin: 1.5rem 0 0.5rem;
}

.md-typeset h4 {
  font-size: 1.125rem; /* text-lg equivalent */
  font-weight: 500;
  line-height: 1.3;
  color: var(--cyber-accent-blue);
  margin: 1.25rem 0 0.25rem;
}

.md-typeset p {
  color: var(--cyber-text-secondary);
  line-height: 1.7;
}

.md-typeset a {
  color: var(--cyber-accent-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

.md-typeset a:hover {
  color: var(--cyber-accent-teal);
}

/* ── HEADER WITH GLASSMORPHISM ── */
.md-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cyber-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.md-header__title {
  color: var(--cyber-accent-blue);
  text-shadow: 0 0 20px var(--cyber-glow-blue);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.25rem;
}

.md-tabs {
  background: var(--cyber-bg-secondary);
  border-bottom: 1px solid var(--cyber-border);
}

.md-tabs__link {
  color: var(--cyber-text-secondary);
  transition: all 0.3s ease;
  font-weight: 500;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  color: var(--cyber-accent-teal);
  text-shadow: 0 0 10px var(--cyber-glow-teal);
}

/* ── SIDEBAR ── */
.md-nav {
  background: var(--cyber-bg-secondary);
  border-right: 1px solid var(--cyber-border);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyber-border) var(--cyber-bg-secondary);
}

.md-nav::-webkit-scrollbar {
  width: 6px;
}

.md-nav::-webkit-scrollbar-track {
  background: var(--cyber-bg-secondary);
}

.md-nav::-webkit-scrollbar-thumb {
  background: var(--cyber-border);
  border-radius: 3px;
}

.md-nav::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-border-light);
}

.md-nav__link {
  color: var(--cyber-text-secondary);
  transition: all 0.3s ease;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 2px 0;
  font-weight: 500;
}

.md-nav__link:hover {
  color: var(--cyber-text-primary);
  background: rgba(59, 130, 246, 0.1);
}

.md-nav__link--active {
  color: var(--cyber-accent-blue);
  background: rgba(59, 130, 246, 0.15);
  border-left: 3px solid var(--cyber-accent-blue);
  font-weight: 600;
}

/* ── MAIN CONTENT AREA ── */
.md-content {
  max-width: 1400px;
  padding: 0 20px;
}

.md-typeset {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cyber-text-primary);
}

/* ── CARDS AND SURFACE ELEMENTS ── */
.resource-card {
  background: var(--cyber-bg-card);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-card:hover {
  border-color: var(--cyber-accent-blue);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.md-typeset h3 {
  color: var(--cyber-accent-blue);
  font-weight: 600;
  margin-top: 2rem;
  position: relative;
  padding-left: 1rem;
}

.md-typeset h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  border-radius: 2px;
}

/* ── TABLES WITH CYBERNETIC DESIGN ── */
.md-typeset__scrollwrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--cyber-border);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Custom scrollbar for tables */
.md-typeset__scrollwrap::-webkit-scrollbar {
  height: 8px;
}

.md-typeset__scrollwrap::-webkit-scrollbar-track {
  background: var(--cyber-bg);
  border-radius: 4px;
}

.md-typeset__scrollwrap::-webkit-scrollbar-thumb {
  background: var(--cyber-border);
  border-radius: 4px;
}

.md-typeset__scrollwrap::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-accent-blue);
}

/* Scrollable indicator for tables */
.md-typeset__scrollwrap {
  position: relative;
}

.md-typeset__scrollwrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to right, transparent, var(--cyber-bg-secondary));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.md-typeset__scrollwrap:hover::after {
  opacity: 1;
}

.md-typeset table:not([class]) {
  background: var(--cyber-bg-secondary);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.md-typeset table:not([class]) thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.md-typeset table:not([class]) th {
  background: linear-gradient(135deg, var(--cyber-accent-blue) 0%, var(--cyber-accent-purple) 100%);
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--cyber-border);
  position: sticky;
  top: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.md-typeset table:not([class]) td {
  background: var(--cyber-bg-tertiary);
  color: var(--cyber-text-primary);
  padding: 1rem;
  border-bottom: 1px solid var(--cyber-border);
  transition: all 0.3s ease;
}

.md-typeset table:not([class]) tbody tr:hover {
  background: rgba(88, 166, 255, 0.1);
  box-shadow: 0 0 15px rgba(88, 166, 255, 0.2);
}

.md-typeset table:not([class]) tbody tr:nth-child(even) {
  background: rgba(33, 38, 45, 0.5);
}

.md-typeset table:not([class]) tbody tr:nth-child(even):hover {
  background: rgba(88, 166, 255, 0.15);
}

/* Table links with neon glow */
.md-typeset table:not([class]) td:last-child a {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  border: 1px solid var(--cyber-accent-blue);
  box-shadow: 0 0 10px var(--cyber-glow-blue);
}

.md-typeset table:not([class]) td:last-child a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--cyber-glow-purple), 0 0 30px var(--cyber-glow-blue);
}

/* ── LINKS WITH NEON GLOW ── */
.md-typeset a {
  color: var(--cyber-accent-blue);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.md-typeset a:hover {
  color: var(--cyber-accent-purple);
  text-shadow: 0 0 15px var(--cyber-glow-purple);
}

.md-typeset a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.md-typeset a:hover::after {
  transform: scaleX(1);
}

/* External link indicator */
.md-typeset a[href^="http"]::after {
  content: ' ↗';
  position: absolute;
  right: -18px;
  top: 0;
  color: var(--cyber-accent-blue);
  font-size: 0.9em;
  opacity: 0.7;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px var(--cyber-glow-blue);
}

.md-typeset a[href^="http"]:hover::after {
  opacity: 1;
  color: var(--cyber-accent-purple);
  text-shadow: 0 0 10px var(--cyber-glow-purple);
  transform: translateX(2px);
}

/* External links in tables */
.md-typeset table:not([class]) td:last-child a[href^="http"]::after {
  display: none;
}

/* ── VISUAL HIERARCHY IMPROVEMENTS ── */

/* Enhanced heading hierarchy */
.md-typeset h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 2rem 0 1.5rem;
  background: linear-gradient(135deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.md-typeset h1::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  margin-top: 1rem;
  border-radius: 2px;
}

.md-typeset h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--cyber-text-primary);
  border-bottom: 2px solid var(--cyber-border);
  padding-bottom: 0.5rem;
  position: relative;
}

.md-typeset h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  border-radius: 1px;
}

.md-typeset h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--cyber-text-primary);
  position: relative;
  padding-left: 1rem;
}

.md-typeset h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  border-radius: 2px;
}

.md-typeset h4 {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 1.25rem 0 0.5rem;
  color: var(--cyber-accent-blue);
}

/* Section dividers */
.md-typeset hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyber-border), transparent);
  margin: 3rem 0;
  position: relative;
}

.md-typeset hr::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--cyber-accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyber-glow-blue);
}

/* Enhanced blockquotes for emphasis */
.md-typeset blockquote {
  border-left: 4px solid var(--cyber-accent-blue);
  background: rgba(88, 166, 255, 0.05);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  color: var(--cyber-text-secondary);
  font-style: italic;
}

.md-typeset blockquote p {
  margin: 0;
}

/* ── RESOURCE CARDS ── */
.resource-card {
  background: var(--cyber-bg-secondary);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.resource-card:hover {
  border-color: var(--cyber-accent-blue);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
  transform: translateY(-2px);
}

.resource-card:hover::before {
  opacity: 1;
}

.resource-card h3 {
  color: var(--cyber-accent-blue);
  margin-top: 0;
}

/* ── MARKDOWN LIST ITEMS AS CARDS ── */
.md-typeset ul li,
.md-typeset ol li {
  background: var(--cyber-bg-secondary);
  border: 1px solid var(--cyber-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.md-typeset ul li::before,
.md-typeset ol li::before {
  color: var(--cyber-accent-blue);
}

.md-typeset ul li:hover,
.md-typeset ol li:hover {
  border-color: var(--cyber-accent-blue);
  background: rgba(88, 166, 255, 0.05);
  box-shadow: 0 0 15px rgba(88, 166, 255, 0.2);
  transform: translateX(4px);
}

.md-typeset ul li a,
.md-typeset ol li a {
  color: var(--cyber-accent-blue);
  font-weight: 500;
  transition: all 0.3s ease;
}

.md-typeset ul li a:hover,
.md-typeset ol li a:hover {
  color: var(--cyber-accent-purple);
  text-shadow: 0 0 10px var(--cyber-glow-purple);
}

.md-typeset ul li strong,
.md-typeset ol li strong {
  color: var(--cyber-accent-purple);
}

/* ── MOBILE EXPERIENCE ENHANCEMENTS ── */
@media (max-width: 768px) {
  .md-typeset ul li,
  .md-typeset ol li {
    padding: 0.875rem 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    touch-action: manipulation;
  }

  .md-typeset ul li:hover,
  .md-typeset ol li:hover {
    transform: none;
  }

  .md-typeset ul li:active,
  .md-typeset ol li:active {
    transform: scale(0.98);
    background: rgba(88, 166, 255, 0.1);
  }

  .md-typeset ul li a,
  .md-typeset ol li a {
    display: block;
    min-height: 44px;
    padding: 0.5rem 0;
  }

  .resource-card {
    padding: 1rem;
    margin: 0.75rem 0;
  }

  .cyber-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .md-typeset h1 {
    font-size: 2rem;
  }

  .md-typeset h2 {
    font-size: 1.5rem;
  }

  .md-typeset h3 {
    font-size: 1.25rem;
  }

  .md-typeset__scrollwrap {
    border-radius: 8px;
  }
}

/* ── BADGES ── */
.cyber-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  border: 1px solid;
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  animation: badgePulse 3s ease-in-out infinite;
}

.cyber-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.cyber-badge:hover::before {
  left: 100%;
}

.cyber-badge:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 5px currentColor;
  }
  50% {
    box-shadow: 0 0 15px currentColor;
  }
}

.badge-research {
  background: rgba(88, 166, 255, 0.25);
  color: var(--cyber-accent-blue);
  border-color: var(--cyber-accent-blue);
  box-shadow: 0 0 15px var(--cyber-glow-blue);
}

.badge-research:hover {
  background: rgba(88, 166, 255, 0.35);
  box-shadow: 0 0 25px var(--cyber-glow-blue), 0 0 35px var(--cyber-glow-blue);
}

.badge-code {
  background: rgba(63, 185, 80, 0.25);
  color: var(--cyber-accent-green);
  border-color: var(--cyber-accent-green);
  box-shadow: 0 0 15px rgba(63, 185, 80, 0.4);
}

.badge-code:hover {
  background: rgba(63, 185, 80, 0.35);
  box-shadow: 0 0 25px rgba(63, 185, 80, 0.5), 0 0 35px rgba(63, 185, 80, 0.3);
}

.badge-safety {
  background: rgba(248, 81, 73, 0.25);
  color: var(--cyber-accent-red);
  border-color: var(--cyber-accent-red);
  box-shadow: 0 0 15px rgba(248, 81, 73, 0.4);
}

.badge-safety:hover {
  background: rgba(248, 81, 73, 0.35);
  box-shadow: 0 0 25px rgba(248, 81, 73, 0.5), 0 0 35px rgba(248, 81, 73, 0.3);
}

.badge-theory {
  background: rgba(188, 140, 255, 0.25);
  color: var(--cyber-accent-purple);
  border-color: var(--cyber-accent-purple);
  box-shadow: 0 0 15px var(--cyber-glow-purple);
}

.badge-theory:hover {
  background: rgba(188, 140, 255, 0.35);
  box-shadow: 0 0 25px var(--cyber-glow-purple), 0 0 35px var(--cyber-glow-purple);
}

/* ── SEARCH BAR WITH CYBERNETIC STYLING ── */
.md-search__input {
  background: var(--cyber-bg-tertiary);
  color: var(--cyber-text-primary);
  border: 1px solid var(--cyber-border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.md-search__input:focus {
  border-color: var(--cyber-accent-blue);
  box-shadow: 0 0 15px var(--cyber-glow-blue);
  outline: none;
}

/* ── FILTER INTERFACE ── */
#table-filter {
  margin: 1.5rem 0;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(188, 140, 255, 0.1) 100%);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--cyber-border);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.2);
  backdrop-filter: blur(10px);
}

#table-filter label {
  display: block;
  color: var(--cyber-accent-blue);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--cyber-glow-blue);
}

#searchInput {
  width: 100%;
  padding: 12px 16px;
  background: var(--cyber-bg-tertiary);
  color: var(--cyber-text-primary);
  border: 1px solid var(--cyber-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

#searchInput:focus {
  border-color: var(--cyber-accent-purple);
  box-shadow: 0 0 15px var(--cyber-glow-purple);
  outline: none;
}

/* ── SEARCH RESULT HIGHLIGHTING ── */
.mark {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.3), rgba(188, 140, 255, 0.3));
  color: var(--cyber-text-primary);
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

/* Search result item highlighting */
.search-result-item {
  transition: all 0.3s ease;
}

.search-result-item:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--cyber-accent-blue);
}

.search-result-item mark {
  background: linear-gradient(135deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
}

/* Live search highlighting */
.highlighted-item {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--cyber-accent-blue) !important;
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
  animation: highlightPulse 1s ease-in-out;
}

@keyframes highlightPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.filter-btn {
  padding: 6px 16px;
  background: rgba(88, 166, 255, 0.2);
  border: 1px solid var(--cyber-accent-blue);
  border-radius: 6px;
  color: var(--cyber-accent-blue);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: var(--cyber-accent-blue);
  color: white;
  box-shadow: 0 0 15px var(--cyber-glow-blue);
  transform: translateY(-1px);
}

/* ── BACK TO TOP BUTTON ── */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  z-index: 1000;
  border: 1px solid var(--cyber-accent-blue);
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px var(--cyber-glow-blue);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px var(--cyber-glow-purple), 0 0 40px var(--cyber-glow-blue);
}

/* ── READING PROGRESS BAR ── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  width: 0%;
  z-index: 1000;
  box-shadow: 0 0 10px var(--cyber-glow-blue);
}

/* ── CODE BLOCKS ── */
.md-typeset pre {
  background: var(--cyber-bg-tertiary);
  border: 1px solid var(--cyber-border);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.md-typeset code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: rgba(88, 166, 255, 0.1);
  color: var(--cyber-accent-blue);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ── BLOCKQUOTES ── */
.md-typeset blockquote {
  border-left: 4px solid var(--cyber-accent-purple);
  background: rgba(188, 140, 255, 0.05);
  color: var(--cyber-text-secondary);
  padding: 1rem 1.5rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 0 15px rgba(188, 140, 255, 0.1);
}

/* ── COLLAPSE TOGGLES ── */
.collapse-toggle {
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid var(--cyber-accent-blue);
  color: var(--cyber-accent-blue);
  transition: all 0.3s ease;
}

.collapse-toggle:hover {
  background: var(--cyber-accent-blue);
  color: white;
  box-shadow: 0 0 15px var(--cyber-glow-blue);
}

/* ── RESOURCE FEEDBACK ── */
.resource-feedback {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.05) 0%, rgba(188, 140, 255, 0.05) 100%);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.feedback-btn {
  background: rgba(88, 166, 255, 0.1);
  border: 2px solid var(--cyber-accent-blue);
  color: var(--cyber-accent-blue);
  transition: all 0.3s ease;
}

.feedback-btn:hover {
  background: var(--cyber-accent-blue);
  color: white;
  box-shadow: 0 0 15px var(--cyber-glow-blue);
  transform: scale(1.1);
}

/* ── RELATED RESOURCES ── */
.related-resources {
  background: var(--cyber-bg-secondary);
  border: 1px solid var(--cyber-border);
  border-left: 4px solid var(--cyber-accent-purple);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 0 20px rgba(188, 140, 255, 0.1);
}

.related-resources h3 {
  color: var(--cyber-accent-purple);
  margin-top: 0;
}

.related-resources a {
  color: var(--cyber-accent-blue);
  transition: all 0.3s ease;
}

.related-resources a:hover {
  color: var(--cyber-accent-purple);
  text-shadow: 0 0 10px var(--cyber-glow-purple);
}

/* ── HERO SECTION ── */
.hero-section {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(188, 140, 255, 0.1) 100%);
  border: 1px solid var(--cyber-border);
  border-radius: 16px;
  padding: 3rem;
  margin: 2rem 0;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(88, 166, 255, 0.2);
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-section p {
  color: var(--cyber-text-secondary);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* ── COMPREHENSIVE RESPONSIVE DESIGN ── */

/* Large screens (1400px+) */
@media screen and (min-width: 1400px) {
  .md-content {
    max-width: 1400px;
    padding: 0 40px;
  }
  
  .hero-section {
    padding: 4rem;
  }
  
  .hero-section h1 {
    font-size: 3rem;
  }
  
  .md-typeset h1 {
    font-size: 2.75rem;
  }
  
  .md-typeset h2 {
    font-size: 2rem;
  }
  
  .md-typeset h3 {
    font-size: 1.75rem;
  }
}

/* Medium screens (1024px - 1399px) */
@media screen and (max-width: 1399px) and (min-width: 1024px) {
  .md-content {
    max-width: 1200px;
    padding: 0 30px;
  }
  
  .hero-section {
    padding: 3rem;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
}

/* Small screens (768px - 1023px) */
@media screen and (max-width: 1023px) and (min-width: 768px) {
  .md-content {
    max-width: 100%;
    padding: 0 25px;
  }
  
  .hero-section {
    padding: 2.5rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .md-nav {
    position: relative;
    max-height: none;
  }
  
  .md-typeset h1 {
    font-size: 2rem;
  }
  
  .md-typeset h2 {
    font-size: 1.5rem;
  }
  
  .md-typeset h3 {
    font-size: 1.25rem;
  }
}

/* Extra small screens (< 768px) */
@media screen and (max-width: 767px) {
  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .md-typeset table:not([class]) {
    font-size: 0.75rem;
  }

  .md-typeset table:not([class]) th,
  .md-typeset table:not([class]) td {
    padding: 0.75rem 0.5rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
  }

  #table-filter {
    padding: 1rem;
  }
  
  .md-content {
    padding: 0 16px;
  }
  
  .md-typeset h1 {
    font-size: 1.75rem;
  }
  
  .md-typeset h2 {
    font-size: 1.25rem;
  }
  
  .md-typeset h3 {
    font-size: 1.1rem;
  }
  
  .md-typeset h4 {
    font-size: 1rem;
  }
  
  .resource-card {
    padding: 1rem;
    margin: 0.75rem 0;
  }
  
  .cyber-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
  }
  
  .md-header__title {
    font-size: 1rem;
  }
  
  .search-input {
    width: 120px;
  }
  
  .search-input:focus {
    width: 160px;
  }
}

/* Ultra small screens (< 480px) */
@media screen and (max-width: 479px) {
  .hero-section {
    padding: 1.5rem 0.75rem;
  }
  
  .hero-section h1 {
    font-size: 1.5rem;
  }
  
  .hero-section p {
    font-size: 0.95rem;
  }
  
  .md-content {
    padding: 0 12px;
  }
  
  .md-typeset h1 {
    font-size: 1.5rem;
  }
  
  .md-typeset h2 {
    font-size: 1.1rem;
  }
  
  .md-typeset h3 {
    font-size: 1rem;
  }
  
  .md-typeset h4 {
    font-size: 0.9rem;
  }
  
  .md-typeset p {
    font-size: 0.9rem;
  }
  
  .resource-card {
    padding: 0.875rem;
    margin: 0.5rem 0;
  }
  
  .search-input {
    width: 100px;
  }
  
  .search-input:focus {
    width: 140px;
  }
  
  .header-actions {
    gap: 6px;
  }
  
  .github-icon {
    width: 32px;
    height: 32px;
  }
}

/* ── SCROLLBAR STYLING ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--cyber-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--cyber-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-accent-blue);
}

/* ── SELECTION STYLING ── */
::selection {
  background: var(--cyber-accent-purple);
  color: white;
}

/* ── MONOSPACE FOR TECHNICAL CONTENT ── */
code, kbd, samp {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── LOADING ANIMATIONS ── */

/* Loading spinner */
.cyber-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--cyber-border);
  border-top-color: var(--cyber-accent-blue);
  border-radius: 50%;
  animation: cyberSpin 1s linear infinite;
}

@keyframes cyberSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Pulse loading animation */
.cyber-pulse {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cyber-accent-blue), var(--cyber-accent-purple));
  animation: cyberPulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes cyberPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

/* Skeleton loading */
.cyber-skeleton {
  background: linear-gradient(90deg, 
    var(--cyber-bg-tertiary) 25%, 
    var(--cyber-border) 50%, 
    var(--cyber-bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: cyberSkeleton 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes cyberSkeleton {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Loading dots */
.cyber-dots {
  display: inline-flex;
  gap: 8px;
}

.cyber-dots span {
  width: 8px;
  height: 8px;
  background: var(--cyber-accent-blue);
  border-radius: 50%;
  animation: cyberDots 1.4s ease-in-out infinite both;
  box-shadow: 0 0 10px var(--cyber-glow-blue);
}

.cyber-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.cyber-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes cyberDots {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Content fade-in animation */
.cyber-fade-in {
  animation: cyberFadeIn 0.5s ease-in;
}

@keyframes cyberFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered fade-in for lists */
.cyber-fade-in-stagger > * {
  animation: cyberFadeIn 0.5s ease-in both;
}

.cyber-fade-in-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.cyber-fade-in-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.cyber-fade-in-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.cyber-fade-in-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.cyber-fade-in-stagger > *:nth-child(5) { animation-delay: 0.5s; }
