  /* Default Light Mode (Fallback) */
  body {
    background-color: white;
    color: black;
    font-family: Arial, sans-serif;
  }

  /* Dark Mode */
  html[data-theme="dark"] body {
    background-color: #292929;
    color: white;
  }

  /* Optional: Style links, buttons, etc., specifically for dark mode */
  html[data-theme="dark"] body a {
    color: #ffffff;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  a:hover {
    color: #00A0C6;
    text-decoration: none;
    cursor: pointer;
  }

  /* Custom dropdown background color */
  .dropdown-menu {
    background-color: #2c2c2c;
    /* Darker grey */
  }

  #mainGallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Adjust the min size as needed */
    gap: 5px;
    /* Space between items */
  }

  #indivCharacterGallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Adjust the min size as needed */
    gap: 15px;
    /* Space between items */
  }

  @media (max-width: 768px) {
    #indivCharacterGallery {
      grid-template-columns: repeat(2, 1fr);
      /* Two columns for smaller screens */
    }

    #mainGallery {
      grid-template-columns: repeat(2, 1fr);
      /* Two columns for smaller screens */
    }
  }


  .gallery-item {
    text-align: center;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  .gallery-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures the image fills the square and is not distorted */
    aspect-ratio: 1 / 1;
    display: block;
  }

  .gallery-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .gallery-caption {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #555;
    /* Adjust color as needed */
    font-style: italic;
  }

  /* Styling for the search bar */
  #searchBar {
    max-width: 400px;
    margin: 0 auto;
  }

  .gallery-tags {
    text-align: center;
  }

  .badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    cursor: default;
  }

  /* Styling for character cards */
  .character-item {
    display: block;
  }

  .card {
    border: 1px solid #000000;
    border-radius: 5px;
    background-color: #c8c8c8;
  }

  html[data-theme="dark"] body .card {
    background-color: #242424;
    color: white;
  }

  .card img {
    max-height: 200px;
    object-fit: contain;
    aspect-ratio: 1/1;
  }

  html[data-theme="dark"] body .card-title {
    color: white;
  }

  .card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: rgb(0, 0, 0);
  }


  #lightboxOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  #lightboxContent {
    position: relative;
    text-align: center;
    max-width: 90%;
    /* Ensures the content area isn't too wide */
    max-height: 80vh;
    /* Limit the height to 80% of the viewport */
    padding-top: 20px;
  }

  #lightboxImage {
    max-width: 100%;
    max-height: 60vh;
    /* Image takes up 60% of the screen */
    margin: 0 auto;
    display: block;
  }

  #lightboxCredit {
    font-size: 14px;
    color: #ccc;
    margin-top: 10px;
    text-align: center;
  }

  #lightboxClose {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
  }

  .character-link {
    display: inline-block;
    white-space: nowrap;
    /* Prevent text wrapping inside the button */
    margin: 10px;
    /* Add some space between buttons */
    flex: 0 0 auto;
    /* Prevent button from stretching */
  }

  .character-icon {
    width: 50px;
    /* Adjust size of the icon */
    height: 50px;
    /* Ensure the icon maintains aspect ratio */
    vertical-align: middle;
    /* Align the icon with the text */
  }

  /* Additional styling to ensure responsiveness */
  @media (max-width: 768px) {
    #lightboxContent {
      padding: 10px;
    }
  }

  :root {
    --primary-color: #000;
  }

  .indent {
    text-indent: 2em;
    /* Adjust the value (e.g., 2em) to control the size of the indentation */
  }

  .accent-bg {
    padding: 10px;
    border-radius: 5px;
    border: 4px double black;
    font-size: 50px;
    font-weight: bold;
    text-align: center;
  }

  .sidebar {
    width: 100px;
    height: 100vh;
    background-color: #343a40;
    color: white;
    position: sticky;
    top: 0;
    overflow-y: auto;
    background-size: cover;
  }

  .sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.1s;
  }

  .sidebar a:hover {
    background-color: #495057;
  }

  .content {
    flex: 1;
    padding: 20px;
  }

  .main-layout {
    display: flex;
    flex-wrap: nowrap;
  }

  #main-character-image {
    width: auto;
    /* Ensures it doesn't exceed the container width */
    height: 400px;
    /* Maintains the aspect ratio */
    display: block;
    margin: 0 auto;
    object-fit: contain;
    /* Prevents distortion */
  }

  .character-card {
    width: 300px;
    flex-shrink: 0;
    float: right;
    margin-left: 5%;
    margin-bottom: 4%;
  }

  @media (max-width: 768px) {
    .sidebar {
      display: none;
    }

    .character-card {
      float: none;
      /* Remove the float */
      margin: 20px auto;
      /* Center the card */
      display: block;
      /* Ensure it's treated as a block-level element */
      width: 100%;
      /* Adjust the width to fit smaller screens */
      max-width: 300px;
      /* Prevent it from becoming too wide */
    }
  }

  /* Add these CSS styles to your existing stylesheet */

  /* Character link card styling */
  .character-link-card {
    transition: all 0.3s ease;
  }

  .character-link-card .card-header {
    cursor: pointer;
    padding: 0.75rem;
    transition: background-color 0.2s ease;
  }

  .character-link-card .card-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  /* Character thumbnails in the header */
  .character-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #007bff;
  }

  /* Character content layout */
  .character-content {
    display: flex;
    margin-bottom: 30px;
  }

  .character-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 120px;
    /* Space for the speech bubble */
  }

  /* Character images in the expanded view */
  .character-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    transition: transform 0.3s ease;
  }

  .character-img:hover {
    transform: scale(1.05);
  }

  /* Speech bubbles */
  .speech-bubble {
    position: absolute;
    bottom: 20px;
    left: 10%;
    right: 10%;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-height: 100px;
    overflow-y: auto;
  }

  .speech-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 0 10px 10px;
    border-style: solid;
    /* Border color will be set dynamically in JS to match background */
  }

  /* Scrollable content in speech bubbles */
  .scrollable-bubble {
    max-height: 100px;
    overflow-y: auto;
  }

  /* Relationship indicator */
  .relationship-indicator {
    color: #6c757d;
    font-size: 1.2rem;
  }

  /* Animation for the toggle icon */
  .toggle-icon {
    transition: transform 0.3s ease;
  }

  .rotate-icon {
    transform: rotate(180deg);
  }

  /* Character names */
  .character-name {
    font-weight: bold;
  }

  /* Relationship summary styling */
  .relationship-summary {
    padding: 15px;
    border-radius: 8px;
    margin-top: 0;
    border-top: 1px solid #dee2e6;
    clear: both;
    position: relative;
    z-index: 10;
    /* Make sure it's above other elements */
  }

  /* Sidebar Styling */
  .sidebar {
    width: 100px;
    background-image: url('images/SitePhotos/GalaxySeamless.jpg');
    /* Replace with your image path */
    background-repeat: repeat;
    /* Ensures the image repeats in both directions */
    background-size: auto;
    /* Adjusts image size as per its original dimensions */
    background-attachment: fixed;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
  }

  @media (max-width: 768px) {
    .sidebar {
      display: none;
    }
  }


  .sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
  }

  .sidebar a:hover {
    background-color: #495057;
  }

  .social-links {
    margin-top: 20px;
  }

  .social-links a {
    display: inline-block;
    margin: 10px;
    padding: 10px 15px;
    text-decoration: none;
    color: white;
    border-radius: 5px;
    font-weight: bold;
  }

  .discord {
    background-color: #5865F2;
  }

  .server {
    background-color: #7289DA;
  }

  .kofi {
    background-color: #FF5E5B;
  }

  .twitter {
    background: #1DA1F2;
  }

  .toyhouse {
    background: #6C757D;
  }

  #characterForm,
  #loginRequired {
    display: none;
  }

  html[data-theme="dark"] body .form-control {
    background-color: #3f3f3f;
    color: white;
  }

  html[data-theme="dark"] body .modal-content {
    background-color: #232323;
    color: #fff;
    border-color: #444;
  }

  html[data-theme="dark"] body .modal-header,
  html[data-theme="dark"] body .modal-footer {
    background-color: #232323;
    color: #fff;
    border-color: #444;
  }

  html[data-theme="dark"] body .modal-title {
    color: #fff;
  }

  .sidebar-nav {
  background-color: var(--bs-dark); /* dark background */
  color: #fff;
  min-height: 100vh; /* full height */
  width: 220px; /* fixed width */
  position: sticky;
  top: 0;
}

/* Mobile sidebar background */
.offcanvas {
  background-color: var(--bs-dark); /* light gray (Bootstrap's default bg-light) */
  width: 10%;
}

/* Sidebar links default color */
.sidebar-nav .nav-link {
    color: #fff;
}

/* Active/hover styles */
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background-color: #0d6efd; /* Bootstrap primary */
  color: #fff;
}

/* Make sidebar toggle full width on small screens */
@media (max-width: 768px) {
  .sidebar-toggle {
    width: 100%;
    display: block;
    margin: 0; /* remove any extra spacing */
    border-radius: 0; /* make it flat across */
  }
}

/* Main content takes remaining space */
#user-container {
  flex: 1;
}

.notification-card {
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  min-height: 140px;
}
.notification-type-title {
  font-size: 1rem;
  color: #1565c0;
}
@media (max-width: 576px) {
  .notification-card {
    min-height: 120px;
  }
}