  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, 79, 120, 0.9) !important;
    /* lighter purple */
    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(180, 0, 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;
  }

  
  /* 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 #6694ff, 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, 27, 80, 0.25);
    /* darker purple */
    border: 1px solid #5864a2;
  }

  .card-back {
    transform: rotateY(180deg);
    font-weight: normal;
    font-size: 11pt;
    background: #333c6e;
    /* darker purple */
  }

  /* Slide-in Pages */
  .page-slide {
    position: fixed;
    top: 60px;
    width: 100%;
    height: calc(100% - 60px);
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    /* match Home gradient */
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    z-index: 100;
    padding-top: 20px;
    padding-left: 30px;
  }

  .page-slide h2 {
    color: rgb(135, 147, 184);
  }

  .page-slide h3 {
    color: rgb(99, 135, 208);
    font-size: 0.9em;
  }

  /* Make hyperlinks lighter and higher contrast on dark backgrounds */
  .page-slide a,
  .page-slide a:visited {
    color: #7a88f2;
    /* bright cyan/teal */
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
  }

  .page-slide a:hover,
  .page-slide a:focus {
    color: hsl(232, 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: #001fe6;
    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: #6666ff;
    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;
  }