:root {
    --color-bg-light: #e6f1ff;
    --color-bg-dark: #0a1126;
    --color-nav-light: #dde7fa;
    --color-nav-dark: #181f36;
    --color-accent: #5b9aff;
    --color-card: #ffffffcc;
    --color-card-dark: #1d233aee;
    --color-text-light: #101435;
    --color-text-dark: #f5f8ff;
    --color-fact-bg: #ffe9a7;
    --color-fact-bg-dark: #6e520a;
    --color-fact-border: #ffbf00;
    --color-fact-border-dark: #ffe066;
    --transition: 0.3s cubic-bezier(.62,-0.13,.44,1.03);
  }
  
  body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--color-bg-light);
    color: var(--color-text-light);
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
  }
  
  /* Dark mode */
  body.dark {
    background: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
  
  header {
    background: linear-gradient(90deg, #0a1126 60%, #2d3d74 100%);
    color: #fff;
    padding: 0;
    position: relative;
    z-index: 2;
  }
  .logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 1rem 2rem;
  }
  .logo-astro {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 30%, #fff 40%, #5b9aff 100%);
    box-shadow: 0 2px 20px #5b9aff50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
  }
  .site-title {
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 2rem;
    letter-spacing: 1px;
    color: #fff;
    margin: 0;
  }
  
  nav {
    background: var(--color-nav-light);
    box-shadow: 0 2px 8px #1d233a10;
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
    transition: background var(--transition);
  }
  body.dark nav {
    background: var(--color-nav-dark);
  }
  nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  nav li {
    margin: 0.5rem 0.7rem;
  }
  nav a {
    text-decoration: none;
    color: var(--color-text-light);
    background: none;
    padding: 0.6em 1.1em;
    border-radius: 22px;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    position: relative;
  }
  body.dark nav a {
    color: var(--color-text-dark);
  }
  nav a.active, nav a:hover, nav a:focus {
    background: var(--color-accent);
    color: #fff;
    outline: none;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 3px 12px #5b9aff50;
    transition: background 0.18s, color 0.18s, transform 0.18s;
  }
  
  /* Light/Dark Mode Button */
  .mode-toggle {
    position: absolute;
    right: 2rem;
    top: 1.1rem;
    background: var(--color-card);
    border: none;
    color: #284078;
    border-radius: 18px;
    padding: 0.4em 1em;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 1px 8px #28407822;
    transition: background var(--transition), color var(--transition);
  }
  body.dark .mode-toggle {
    background: var(--color-card-dark);
    color: var(--color-text-dark);
  }
  
  /* Main Content Layout */
  main {
    max-width: 900px;
    margin: 2rem auto 1.5rem auto;
    padding: 1.5rem 1.2rem;
    background: var(--color-card);
    border-radius: 16px;
    box-shadow: 0 6px 36px #5b9aff12;
    position: relative;
    z-index: 1;
    min-height: 60vh;
    transition: background var(--transition), color var(--transition);
  }
  body.dark main {
    background: var(--color-card-dark);
    color: var(--color-text-dark);
  }
  h1, h2, h3, h4 {
    font-family: 'Orbitron', Arial, sans-serif;
    color: var(--color-accent);
    margin-top: 0.7em;
  }
  body.dark h1, body.dark h2, body.dark h3, body.dark h4 {
    color: #9bbfff;
  }
  img, video {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 18px #0002;
  }
  
  .fact-box {
    background: var(--color-fact-bg);
    border-left: 6px solid var(--color-fact-border);
    padding: 1em 1.5em;
    margin: 1.2em 0;
    border-radius: 10px 30px 30px 10px;
    font-size: 1.07em;
    font-style: italic;
    box-shadow: 0 2px 12px #ffbf0030;
    transition: background 0.3s, border 0.3s;
  }
  body.dark .fact-box {
    background: var(--color-fact-bg-dark);
    border-left: 6px solid var(--color-fact-border-dark);
    color: #fff3c3;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: var(--color-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px #006fbb10;
  }
  body.dark table {
    background: var(--color-card-dark);
  }
  th, td {
    padding: 0.8em;
    border-bottom: 1px solid #b8d7ff;
    text-align: left;
  }
  body.dark th, body.dark td {
    border-bottom: 1px solid #3c4c7a;
  }
  th {
    background: var(--color-accent);
    color: #fff;
    font-size: 1.05em;
  }
  caption {
    font-weight: bold;
    margin-bottom: 0.4em;
    font-size: 1.1em;
  }
  
  form {
    display: flex;
    flex-direction: column;
    gap: 1.1em;
    margin-top: 1.7em;
  }
  label {
    font-weight: bold;
    margin-bottom: 0.3em;
  }
  input, textarea, select, button[type="submit"] {
    padding: 0.7em;
    border-radius: 7px;
    border: 1px solid #b6c7e2;
    font-size: 1em;
    box-sizing: border-box;
    background: var(--color-nav-light);
    color: var(--color-text-light);
    transition: border 0.18s, background 0.18s;
  }
  body.dark input, body.dark textarea, body.dark select {
    background: var(--color-nav-dark);
    color: var(--color-text-dark);
    border-color: #3c4c7a;
  }
  input:focus, textarea:focus, select:focus {
    border: 1.5px solid var(--color-accent);
    outline: none;
  }
  button[type="submit"] {
    background: var(--color-accent);
    color: #fff;
    font-weight: bold;
    border: none;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    cursor: pointer;
  }
  button[type="submit"]:hover, button[type="submit"]:focus {
    background: #3673d9;
    color: #fff;
    transform: scale(1.05);
  }
  
  .comment-section {
    margin: 2.3em 0 1.5em 0;
    background: #e8f2ffcc;
    padding: 1.5em 1.2em;
    border-radius: 10px;
    box-shadow: 0 1px 8px #5b9aff11;
  }
  body.dark .comment-section {
    background: #1b263aee;
    color: #fff;
  }
  .comment-section h3 {
    margin-top: 0;
    color: var(--color-accent);
  }
  .comment-list {
    margin-top: 1em;
    padding-left: 0;
    list-style-type: none;
  }
  .comment-list li {
    margin-bottom: 1em;
    background: #fafdff88;
    padding: 0.6em 0.9em;
    border-radius: 7px;
    border-left: 3px solid var(--color-accent);
  }
  body.dark .comment-list li {
    background: #22305a88;
    color: #e8eaff;
  }
  
  @media (max-width: 650px) {
    .logo-area {
      flex-direction: column;
      gap: 0.4em;
      padding: 0.5em 0.8em;
    }
    .site-title {
      font-size: 1.2rem;
    }
    .logo-astro {
      width: 38px;
      height: 38px;
      font-size: 1.3rem;
    }
    nav ul {
      flex-direction: column;
      align-items: stretch;
      gap: 0.5em;
    }
    nav li {
      margin: 0.25em 0.1em;
    }
    main {
      margin: 1em 0.1em;
      padding: 1em 0.4em;
      border-radius: 10px;
    }
    table, th, td {
      font-size: 0.97em;
      padding: 0.4em;
    }
    .mode-toggle {
      right: 0.7em;
      top: 0.7em;
      font-size: 0.97em;
      padding: 0.3em 0.7em;
    }
  }
  
  .starfield {
    z-index: 0;
    position: fixed;
    left: 0; top: 0; width: 100vw; height: 100vh;
    pointer-events: none;
  }
  /* Add Orbitron font */
  @import url('https://fonts.googleapis.com/css?family=Orbitron:wght@700&display=swap');

  .top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: linear-gradient(90deg, #0a1126 60%, #2d3d74 100%);
    box-shadow: 0 2px 12px #0002;
  }
  .top-bar header {
    background: none;
    box-shadow: none;
  }
  .top-bar nav {
    background: var(--color-nav-light);
    box-shadow: 0 2px 8px #1d233a10;
  }
  body.dark .top-bar nav {
    background: var(--color-nav-dark);
  }
  @media (max-width: 650px) {
    .top-bar {
      box-shadow: 0 1px 8px #0002;
    }
  }

  footer {
    width: 100%;
    background: #101435;
    color: #f6f7ff;
    text-align: center;
    padding: 1.3em 0 0.7em 0;
    margin-top: 2em;
    font-size: 1.08em;
    letter-spacing: 0.01em;
    box-shadow: 0 -2px 18px #001a2e33;
  }
  footer a {
    color: #5b9aff;
    text-decoration: underline;
  }
  body.dark footer {
    background: #181f36;
    color: #c8dafc;
  }

  .mode-toggle {
    position: absolute;
    right: 2rem;
    top: 1.1rem;
    background: var(--color-card);
    border: none;
    color: #284078;
    border-radius: 18px;
    padding: 0.4em 1em;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 1px 8px #28407822;
    transition: background var(--transition), color var(--transition);
    z-index: 20;
  }

  [data-tooltip] {
    position: relative;
    cursor: pointer;
  }
  