/*fonts*/

        :root {
            --primary: #fb923c;         
            --primary-hover: #f97316;
            --secondary: #1bbdfe;      
            --accent: #7643e3;         
            --accent-hover: #6131d6;
            --links: #49c4f1;
            --links-hover: #3aaed8;
            --text: #ffffff;
            --text-light: #6b7280;
            --modal:#000000;
            --bg: #ffffff;
            --bg-secondary: #f9fafb;
            --border: #e5e7eb;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --bs-btn-close-color: #000;
            --bs-btn-close-color-hover: #000;
        }

        .dark-mode {
        --primary: #fb923c;         
        --primary-hover: #f97316;
        --secondary: #1bbdfe;      
        --accent: #7643e3;         
        --accent-hover: #6131d6;
        --links: #33c9b0;
        --links-hover:#17ad94;
        --modal:#ffffff;
        --bg: #000000;
        --bg-secondary: #0a0a0a;
        --border: #1f1f1f;
        --text: #e5e7eb;
        --text-light: #9ca3af;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    }
@font-face {
    font-family: 'Orbitron';
    src: url('Orbitron-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
  }
  @font-face {
    font-family: 'Inter';
    src: url('Inter-VariableFont_opsz,wght.ttf') format('truetype');
  }
  h1, h2, h3, h4, h5, h6,
  .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
      font-family: 'Orbitron', sans-serif;
      font-weight: normal;
  }
  body, p, li, span, a, td, th, input, textarea, button {
    font-family: Inter, sans-serif;
    
  }
  li {
  font-size: 18px;
  line-height: 1.3;      
  margin-bottom: 0.5em;  
}

  body {
    margin: 0;
    height: 100%;
      color:#e9ecef !important;

    /*background-image: url("https://static.igem.wiki/teams/5634/templatedraft/background-wiki.svg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    */
background: linear-gradient(180deg,rgba(133, 20, 20, 1) 3%, rgba(143, 67, 40, 1) 56%, rgba(166, 91, 30, 1) 97%);color:#e9ecef

  }

  
/*
.modal-overlay {
  background-image: url("https://static.igem.wiki/teams/5634/wiki/home/hologramm.webp");
  opacity: 0.5;
  background-size: cover;      
  background-position: center;  
  background-repeat: no-repeat;

  opacity: 1;                 
  padding: 1.5rem;
  width: 80%;          
 
  z-index: 10;               
}
  */
body.dark-mode{
  background:#000;
  color:#e9ecef

}


body.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}




  .left-aligned { margin-left: auto; }
  /*
  .bg-dark {
    background:linear-gradient(150deg, #FB923C 0%, #8c1f1f 20%, #000000 35%);
    /*background-color: rgba(0, 0, 0, 0.8) !important; 
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(27, 189, 254, 0.35);
    background-repeat: no-repeat;
    color: var(--text);
    z-index: 9997;} */
    
  body.bg-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
  }
  body.dark-mode.bg-hero {
    background:linear-gradient(150deg, #FB923C 0%, #8c1f1f 20%, #000000 35%);
  }

 

.hero-wrapper {
  position: relative;
  width: min(40vw, 30vw); 
  margin-right: 4rem;
  margin-top: 4rem;
}

.hero-dom {
  position: absolute;
  inset: 0;                
  background-image: url("https://static.igem.wiki/teams/5634/wiki/astroowl/dom-circle.svg");
  background-size: contain; 
  background-repeat: no-repeat;
  background-position: 90% center; 

  z-index: 1;

}

/* Bild oben */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  z-index:2
}

.hero-art img {
  width: 80%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.45));
}


  .mars-title-typing {
    width: fit-content;
  }

  
.typing-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: .15em solid var(--primary);
  font-family: 'Orbitron', sans-serif;
  width: 0; /* <-- Ensure this is present */
  animation: none;
}
  
  @keyframes typing {
    from { width: 0 }
    to { width: 100% }
  }
  
  @keyframes blink-caret {
    0%, 100% { border-color: var(--primary); }
    50% { border-color: transparent; }
  }
  
  /* CALLOUT */
  .bd-callout { padding:1.25rem; margin-top:1.25rem; margin-bottom:1.25rem; border:1px solid #e9ecef; border-left-width:.25rem; border-radius:.25rem }
  .bd-callout h4 { margin-bottom: 1.25rem }
  .bd-callout p:last-child { margin-bottom:0 }
  .bd-callout code { border-radius:.25rem }
  .bd-callout+.bd-callout { margin-top:-.25rem }
  .bd-callout-info { border-left-color:var(--secondary) }
  .bd-callout-warning { border-left-color:var(--secondary) }
  .bd-callout-danger { border-left-color:#d9534f }
  
  
  /* footer background and overlay */
  footer.footer {
   position:relative;
   width: 100%;
    background-image: url("https://static.igem.wiki/teams/5634/templatedraft/wiki-footer-new-cut.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: white;
  }
 
  
  /* overlay to darken the background image for better text readability, maybe shaders later on also for the headers
  footer.footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(63, 55, 55, 0.6);
    z-index: 0;
  }
  
  /* container content above the overlay 
  footer.footer > .container {
    position: relative;
    z-index: 1;
  }
  */
  /* footer links */
  footer a {
    color: white;
    text-decoration: none;
  }
  
  footer a:hover {
    color: white;
    text-decoration: underline;
  }
  .toast {
      background-color: #252545;
      border-left: 4px solid var(--secondary);
      box-shadow: 0 0 15px rgba(255, 76, 76, 0.4);
  }
  /* scrollspy
  #scrollspy-nav .nav-link {
    color: #efebea;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out;
  }
  #scrollspy-nav .nav-link.active,
  #scrollspy-nav .nav-link:focus,
  #scrollspy-nav .nav-link:hover {
    background: #ffbe3c;
    color: #2c2727;
  }
*/


  

:root {
    font-size: 16px; /* Base size for rem calculations */
    --space-sm: 0.75rem;  /* 12px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 1.5rem;   /* 24px */
    --space-xl: 1.875rem; /* 30px */
    --space-xxl: 2.5rem;  /* 40px */
    --border-radius-sm: 0.5rem;  /* 8px */
    --border-radius-md: 0.9375rem; /* 15px */
    --border-radius-lg: 1.25rem;   /* 20px */
    /* Individual team profile */
    --card-height: 250px;
    --card-width: calc(var(--card-height) / 1.5);
}


/* Cards */
.info-card {
  background: rgba(255, 255, 255, 0.12);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);

}


/* Tap Effect (Mobile) */
.info-card:active {
  /*transform: scale(0.97);*/
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Individual team profile */
.card {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  /* display: flex; */
  /* justify-content: center; */
  padding: 0 36px;
  perspective: 2500px;
  margin: 45px;
  margin-bottom: 0;
  /*right: 120px;*/
  align-items: center;
  background: #191c29;
  /* overflow: hidden */
}

.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wrapper {
  transition: all 0.5s;
  position: absolute;
  width: 100%;
  z-index: -1;
  
}

.card:hover .wrapper {
  transform: perspective(900px) translateY(-5%) rotateX(25deg) translateZ(0);
  box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
  -webkit-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: 2px 35px 32px -8px rgba(0, 0, 0, 0.75);
}

.wrapper::before,
.wrapper::after {
  content: "";
  opacity: 0;
  width: 100%;
  height: 80px;
  transition: all 0.5s;
  position: absolute;
  left: 0;
}
.wrapper::before {
  top: 0;
  height: 100%;
  background-image: linear-gradient(
    to top,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}
.wrapper::after {
  bottom: 0;
  opacity: 1;
  background-image: linear-gradient(
    to bottom,
    transparent 46%,
    rgba(12, 13, 19, 0.5) 68%,
    rgba(12, 13, 19) 97%
  );
}

.card:hover .wrapper::before,
.wrapper::after {
  opacity: 1;
}

.card:hover .wrapper::after {
  height: 120px;
}
.title {
  width: 100%;
  transition: transform 0.5s;
  
}
.card:hover .title {
  transform: translate3d(0%, -50px, 100px);
}

.character {
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
  position: absolute;
  z-index: -1;

}

.card:hover .character {
  opacity: 1;
  transform: translate3d(0%, -30%, 100px);
}

  /* Scroll progress bar */
  .progress-container {
      position: fixed;
      height: 5px;
      /* background: rgba(221, 221, 221, 0.3); */
      z-index: 9997;
        }
  .progress-bar {
      height: 100%;
      width: 0%;
      transition: width 0.1s ease-out;
      background: linear-gradient(90deg, #4CAF50, #48CAE4) !important; /* Gradient for visual appeal */
    }
.progress-tip {
  position: absolute;
  top: -10px; /* Adjust to align with bar */
  /* left: 0; */
  transform: translateX(-50%); /* Center tip on progress */
  font-size: 16px;
  transition: left 0.1s ease-out;
  z-index: 9999;
}

/*mega menu */
/* Main Navigation Bar */
.mainnav-subcategory-item {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.nav-icon {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
    flex: 0 0 auto;
    transition: filter 0.2s, transform 0.2s;
}

/* Light mode: normal icons */
body:not(.dark-mode) .nav-icon {
    filter: none;
}

/* Dark mode: white fill for icons */
body.dark-mode .nav-icon {
    filter: brightness(0) invert(1);
}

/* Hover/active effect for both modes */
.mainnav-subcategory-item:hover .nav-icon,
.mainnav-subcategory-item--active .nav-icon {
    filter: drop-shadow(0 0 6px var(--secondary)) brightness(1.2) contrast(1.2);
    transform: scale(1.15);
}

/* Extra glow for dark mode with white fill */
body.dark-mode .mainnav-subcategory-item:hover .nav-icon,
body.dark-mode .mainnav-subcategory-item--active .nav-icon {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px var(--secondary));
}



.mainnav-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg);
    box-shadow: var(--shadow);
    z-index: 9999;
}
body:not(.dark-mode) .mainnav-navbar,
body:not(.dark-mode) .mainnav-navbar *,
body:not(.dark-mode) .mainnav-logo,
body:not(.dark-mode) .mainnav-item {
  color: #000000 !important;
}


.mainnav-container {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.mainnav-logo {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    margin-right: 2rem;
    color:#0a0a0a
}
body.dark-mode .mainnav-logo {
    color: #ffffff;
}
.mainnav-logo img {
    height: 32px;
}

.mainnav-menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.mainnav-item {
    position: relative;
    padding: 1.25rem 1rem;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/*brute force*/
body:not(.dark-mode) .mainnav-item:hover,
body:not(.dark-mode) .mainnav-item--hover,
body:not(.dark-mode) .mainnav-item--active {
  color: var(--secondary) !important;
}
body.dark-mode .mainnav-item:hover,
body.dark-mode .mainnav-item--hover,
body.dark-mode .mainnav-item--active {
  color: var(--secondary) !important;
}

.mainnav-item--active {
   position: relative;
}
.mainnav-item--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary);
}

/* Theme Switch */
.mainnav-theme-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.mainnav-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.mainnav-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mainnav-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.mainnav-switch-slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.mainnav-switch input:checked + .mainnav-switch-slider {
    background-color: var(--secondary);
}

.mainnav-switch input:checked + .mainnav-switch-slider::before {
    transform: translateX(26px);
}

/* Mega Menu */
.mainnav-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg);
    box-shadow: var(--shadow);
    padding: 2rem;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.mainnav-mega-menu--active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mainnav-mega-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
}

/* Subcategories */
.mainnav-subcategories {
    border-right: 1px solid var(--border);
    padding-right: 1rem;
}

.mainnav-subcategory-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.mainnav-subcategory-list {
    list-style: none;
}

.mainnav-subcategory-item {
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    font-weight: 500;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mainnav-subcategory-item:hover,
.mainnav-subcategory-item--active {
    color: var(--secondary);
    background-color: var(--bg-secondary);
}

/* Content Area */
.mainnav-content-area {
    display: grid;
    gap: 1.5rem;
}

.mainnav-content-section {
    display: none;
}

.mainnav-content-section--active {
    display: block;
    animation: mainnav-fadeIn 0.3s ease forwards;
}

.mainnav-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mainnav-content-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mainnav-content-title i {
    color: var(--secondary);
}

.mainnav-view-all {
    font-size: 0.875rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mainnav-view-all:hover {
    text-decoration: underline;
}

.mainnav-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Cards */
.mainnav-card {
    background-color: var(--bg);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.mainnav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.mainnav-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.mainnav-card-link .mainnav-card {
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.mainnav-card-link .mainnav-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.mainnav-card-image {
    height: 0;
    padding-bottom: 60%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.mainnav-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--secondary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.mainnav-card-body {
    padding: 1rem;
}

.mainnav-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.mainnav-card-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.mainnav-card-meta {
    display: flex;
    justify-content: flex-end;
    padding-right: 1em; 
    font-size: 0.75rem;
    color: var(--text-light);
}
.navbar.fixed-top {
  z-index: 9999 !important;
}
/* Animations */
@keyframes mainnav-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
 .accordion-body {
  background: rgba(35, 79,103, 0.85); 
  color: #e9f6ff; 
  line-height: 1.7;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(82, 209, 255, 0.1);
}


.accordion .accordion-button {
  background-color: var(--blueprint-bg);
  color: var(--text);
  border: 3px solid var(--box-border);
  border-radius: var(--radius);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding: 1rem 1.25rem;
  transition: all 0.25s ease;
  overflow: hidden;

  background-image:
    linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(var(--box-border), var(--box-border)),
    linear-gradient(var(--box-border), var(--box-border)),
  
    linear-gradient(var(--box-border), var(--box-border)),
    linear-gradient(var(--box-border), var(--box-border)),
    
    linear-gradient(var(--box-border), var(--box-border)),
    linear-gradient(var(--box-border), var(--box-border)),
    
    linear-gradient(var(--box-border), var(--box-border)),
    linear-gradient(var(--box-border), var(--box-border));
  background-size:
    30px 30px, 30px 30px,
    var(--corner-size) 2px, 2px var(--corner-size),
    var(--corner-size) 2px, 2px var(--corner-size),
    var(--corner-size) 2px, 2px var(--corner-size),
    var(--corner-size) 2px, 2px var(--corner-size);
  background-position:
    0 0, 0 0,
    left var(--corner-offset) top var(--corner-offset),
    left var(--corner-offset) top var(--corner-offset),
    right var(--corner-offset) top var(--corner-offset),
    right var(--corner-offset) top var(--corner-offset),
    left var(--corner-offset) bottom var(--corner-offset),
    left var(--corner-offset) bottom var(--corner-offset),
    right var(--corner-offset) bottom var(--corner-offset),
    right var(--corner-offset) bottom var(--corner-offset);
  background-repeat: no-repeat;
}

.accordion .accordion-button:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(82, 209, 255, 0.3);
  color: #ffffff;
}

.accordion .accordion-button:not(.collapsed) {
  color: #ffffff;
  border-color: var(--box-border);
  background-color: rgba(15, 25, 40, 0.95);
  box-shadow: inset 0 0 40px rgba(82, 209, 255, 0.25);
}


.accordion .accordion-button::after {
  display: none;
}

.accordion.accordion-body {
  background: rgba(20, 25, 40, 0.85); 
  color: #e9f6ff; 
  line-height: 1.7;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(82, 209, 255, 0.1);
}


/* Link color styling */
.ref-link {
  color: #33c9b0;             
  font-weight: bold;           /* bold like references */
  cursor: pointer;             /* pointer cursor */
}
.ref-link:hover {
  color: #17ad94;              /* darker blue on hover */
  text-decoration: underline;  /* add underline on hover */
}

/* popover styling for clicked references */
.popover {
  background-color: var(--background);
  border: 1px solid var(--secondary);
  color: var(--primary);  
  max-width: 400px;           /* wider for readability */
  font-size: 0.9rem;          /* slightly smaller text */
}

.popover-header {
  background-color: var(--bg);
  color: var(--secondary);
  font-weight: bold;
  font-weight: bold;
}

.popover-body {
   color: var(--primary);              /* dark readable text */
  line-height: 1.4;
  background-color: var(--bg)
}


.popover a:hover {
  text-decoration: underline;
  color: var(--links-hover);
}
.popover a {
  color: var(--links-hover);
  font-weight: 500;
  text-decoration: none;
}

a.dark-mode {
  color: var(--links);
  text-decoration: none;
}
a.dark-mode:hover {
  color: var(--links-hover);
  text-decoration: underline;
}
.popover a.dark-mode:hover {
  text-decoration: underline;
  color: var(--links-hover);
}
.popover a.dark-mode {
  color: var(--links-hover);
  font-weight: 500;
  text-decoration: none;
}

a {
  color: var(--links);
  text-decoration: none;
}
a:hover {
  color: var(--links-hover);
  text-decoration: underline;
}

body.homepage a {
  color: #2d5ac0;            
  text-decoration: none;
  transition: color .2s ease, text-shadow .2s ease;
}

body.homepage a:hover {
  color: #52b5d3;
  text-decoration: underline;
  text-shadow: 0 0 6px rgba(154,232,255,.35);
}
#sidebar-nav {
  position: fixed;
  left: 0;
  top: 68px;
  width: 70px;
  height: calc(100vh - 68px);
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  border-right: 1px solid rgba(27, 189, 254, 0.5);
  display: flex;
  flex-direction: column;
  transition: width .3s ease;
  z-index: 2000;
  overflow-x: hidden;
  overflow-y: visible;
   scrollbar-width: thin;
  scrollbar-color: #48cae4 rgba(10, 20, 30, 0.35);

}

#sidebar-nav.expanded { width: 280px; }

.sidebar-header {
  height: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  display: block;
}

.sidebar-header > *:not(#edgeToggle) { display: none; }

#sidebar-nav.expanded .sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  color: #e6f7ff;
  font-weight: 600;
  border-bottom: 1px solid rgba(27,189,254,.5);
  height: auto;
}

#sidebar-nav.expanded .toggle-button {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #e6f7ff;
  font-size: 14px;
  cursor: pointer;
}

.edge-toggle {
  position: absolute;
  top: 10px;
  right: -11px;
  width: 28px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(0,0,0,.9);
  border: 1px solid rgba(27,189,254,.5);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: #e6f7ff;
  z-index: 2100;
  box-shadow: 0 0 16px rgba(27,189,254,.25), inset 0 0 8px rgba(27,189,254,.15);
}

.edge-toggle:hover { background: rgba(255,255,255,.06); }
.edge-toggle .icon { transition: transform .3s ease; }
#sidebar-nav.expanded .edge-toggle .icon { transform: rotate(180deg); }

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 0 35px;
  scrollbar-width: thin;
  scrollbar-color: #48cae4 rgba(10, 20, 30, 0.35);
  scrollbar-gutter: stable both-edges;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(72,202,228,.35) 0, transparent 60%) 0 0 / 160px 160px,
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.25) 0, transparent 60%) 0 0 / 220px 220px;
}

.sidebar-scroll::-webkit-scrollbar { width: 10px; }
.sidebar-scroll::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(10,20,30,.45), rgba(10,20,30,.15));
  border-left: 1px solid rgba(27,189,254,.15);
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5ae0ff, #1bbdfe);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(27,189,254,.6);
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7beaff, #35caff);
}

.planet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
}
.planet-item:hover { background: rgba(255, 255, 255, 0.08); }
.planet-item img { width: 32px; height: 32px; flex-shrink: 0; }

.planet-name {
  color: #e6f7ff;
  font-size: 15px;
  white-space: normal;
  flex-wrap: wrap;
  word-break: break-word;
  opacity: .95;
}

.planet-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #1bbdfe;
  box-shadow: 0 0 8px rgba(27,189,254,.9);
  border-radius: 3px;
}
.planet-item.active img {
  outline: 2px solid rgba(27, 189, 254, .8);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(27, 189, 254, .6);
}

.h3-list { display: none; margin: 0 0 6px 56px; }
#sidebar-nav.expanded .h3-list { display: block; }

.h3-link {
  display: block;
  color: #9abfcf;
  padding: 4px 0;
  font-size: 13px;
  cursor: pointer;
}
.h3-link:hover { color: #cfe9f5; text-decoration: underline; }

#sidebar-nav:not(.expanded) .planet-name { display: none; }
#sidebar-nav:not(.expanded) .planet-item:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 76px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.9);
  color: #e6f7ff;
  padding: 6px 8px;
  border: 1px solid rgba(27,189,254,.4);
  border-radius: 8px;
  white-space: nowrap;
}
#sidebar-nav:not(.expanded) .planet-item::after { pointer-events: none; }
#sidebar-nav .planet-item { pointer-events: auto; }

[id] { scroll-margin-top: 120px; }

