  html {
    background: #181818 !important;
  }

  body {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    overflow-x: hidden;
  }

  /* --- Always use dark navbar for /db subsite --- */
  .navbar {
    background: rgba(54, 120, 120, 0.9) !important;
    /* lighter teal */
    color: #fff !important;
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
  }

  .navbar .nav-link,
  .navbar .navbar-brand {
    color: #fff !important;
    text-shadow: 0 1px 2px #000;
    transition: color 0.3s ease, text-shadow 0.3s ease;
  }

  .navbar .nav-link:hover,
  .navbar .nav-link:focus {
    color: #f6e583 !important;
  }

  .navbar .nav-link.active {
    color: white !important;
    background: rgba(0, 255, 255, 0.12);
    border-radius: 6px;
    font-weight: bold;
  }

  /* Remove white box around Home on small screens */
  .navbar-brand,
  .navbar-brand:focus,
  .navbar-brand:active {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  .navbar-toggler {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* --- Unused: Light navbar option (for future use) --- */

  .navbar.light {
    background: rgba(230, 250, 250, 0.95) !important;
    color: #222 !important;
  }

  .navbar.light .nav-link,
  .navbar.light .navbar-brand {
    color: #007070 !important;
    text-shadow: none;
  }

  .navbar.light .nav-link:hover,
  .navbar.light .nav-link:focus {
    color: #005050 !important;
  }


  /* DB Page Header */
  .db-page-header {
    max-width: 900px;
    margin: 80px auto 32px auto;
    text-align: center;
  }

  .db-page-header h1 {
    font-size: 2.2rem;
    margin-top: 10px;
    padding-top: 10px;
    margin-bottom: 0.5rem;
    color: rgb(220, 206, 175);

  }

  .db-page-header .lead {
    font-size: 1.2rem;
    color: rgb(220, 206, 175);
  }

  /* Card Grid */
  #card-view {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 100px;
    gap: 20px;
  }

  .card-container {
    perspective: 1000px;
  }

  .card-container a {
    text-decoration: none;
  }

  .card-flip {
    width: 220px;
    height: 140px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s, box-shadow 0.3s;
    cursor: pointer;
    display: block;
  }

  .card-container:hover .card-flip {
    transform: rotateY(180deg) scale(1.05);
    box-shadow: 0 0 32px 8px #66ffed, 0 0 8px 2px #fff0ff;
  }

  .card-front,
  .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    color: rgb(220, 206, 175);
    font-weight: bold;
    backface-visibility: hidden;
    background: rgba(0, 80, 80, 0.25);
    /* darker teal */
    border: 1px solid #007070;
  }

  .card-back {
    transform: rotateY(180deg);
    font-weight: normal;
    font-size: 11pt;
    background: rgba(0, 80, 80, 0.35);
    /* darker teal */
  }

  /* Slide-in Pages */
  .page-slide {
    position: relative;
    top: 60px;
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    /* match DB Home gradient */
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    z-index: 100;
    padding-top: 20px;
    padding-left: 30px;
  }

  .page-slide h2 {
    color: rgb(135, 184, 184);
  }

  .page-slide h3 {
    color: rgb(99, 208, 141);
    font-size: 0.9em;
  }

  /* Make hyperlinks lighter and higher contrast on dark backgrounds */
  .page-slide a,
  .page-slide a:visited {
    color: #7ac8f2;
    /* bright cyan/teal */
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
  }

  .page-slide a:hover,
  .page-slide a:focus {
    color: hsl(202, 100%, 87%);
    /* pure white on hover/focus */
    text-decoration: underline;
  }

  /* Arrows */
  S .arrow-left,
  .arrow-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.2em;
    color: #00e6e6;
    opacity: 0.95;
    cursor: pointer;
    z-index: 999;
    user-select: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    transition: color 0.2s, opacity 0.2s, transform 0.2s;
  }

  .arrow-left {
    left: 20px;
  }

  .arrow-right {
    right: 20px;
  }

  .arrow-left:hover,
  .arrow-right:hover {
    opacity: 1;
    color: #66ffff;
    transform: translateY(-50%) scale(1.08);
  }

  /* Footer */
  footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    text-align: center;
    padding: 5px 0;
    font-size: 0.9em;
  }