.navbar {
    display: inline-block; 
    justify-content: center; 
    background-color: #333333; /* Moved background here for a solid bar */
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;        /* Makes the list itself a flex container */
    flex-wrap: wrap;      /* Allows items to move to the next line on mobile */
    justify-content: center; /* Centers items even when they wrap! */
}

.navbar ul li {
    /* REMOVED float: left; - Flexbox handles this now */
}

.navbar ul li a {
    font-family: "Times New Roman", Times, serif;
    display: block;
    color: #bbb496;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.navbar ul li a:hover {
    background-color: #111111;
}

.img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: "Times New Roman", Times, serif;
    font-family: Arial, sans-serif;
    background-color: #1e1f22;
    margin: 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0px;
}

header {
    font-family: "Times New Roman", Times, serif;
    color: #bbb496;
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0px;
}

footer {
    font-family: "Times New Roman", Times, serif;
    color: #bbb496;
}

article {
    font-family: "Times New Roman", Times, serif;
    color: #bbb496;
    max-width: 800px;
    margin: 0 auto;
    padding: 0px;
}

/* Links */

a:link {
  color: #bbb496;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: pink;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: rgb(169, 254, 255);
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: rgb(33, 152, 0);
  background-color: transparent;
  text-decoration: underline;
}

/* Comic Styles */

.comic-description {
    font-family: "Times New Roman", Times, serif;
    color: #bbb496;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.comic-container {
    font-family: "Times New Roman", Times, serif;
    max-width: 1000px; /* Maximum width of the comic */
    margin: 0 auto;    /* Centers the container */
    padding: 10px;
}

.comic-page {
    max-width: 100%;   /* Ensures image doesn't overflow */
    height: auto;      /* Maintains aspect ratio */
    display: block;
    margin: 10px auto;
}

.comic-nav {
    margin: 15px 0;
}

.comic-nav a {
    text-decoration: none;
    background-color: #333;
    color: white;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
}

.comic-nav a:hover {
    background-color: #555;
}

/* Loading */
.img-loading {
    opacity: 0.6;
    cursor: wait !important;
}

/* A simple loading overlay */
#loading-overlay {
    text-align: center;
    color: #bbb496;
    padding: 20px;
}

/* Image stuff */
.character-face {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 500px; /* Optional: set a width smaller than the container */
}