body {
    background-color: #1a1a1a;
    color: #f0f0f0;
    font-family: 'Delius', cursive;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 90%; 
    margin: 0 auto;
    padding: 20px;
    min-width: 320px; 
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2a2a2a;
    padding: 10px 20px;
    border-radius: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

h1 {
    margin: 0;
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.desktop-nav a {
    color: #f0f0f0; /* Light gray */
    text-decoration: none;
    padding: 10px 15px;
    background-color: #3a3a3a;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.desktop-nav a:hover {
    background-color: #4a4a4a;
}

.desktop-nav a:visited {
    color: #f0f0f0; /* Ensures visited links stay light gray */
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 24px;
    cursor: pointer;
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background-color: #2a2a2a;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: none;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    border-bottom: 1px solid #3a3a3a;
}

.sidebar a {
    display: block;
    padding: 15px 20px;
    color: #f0f0f0; /* Light gray */
    text-decoration: none;
}

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

.sidebar a:visited {
    color: #f0f0f0; /* Ensures visited links stay light gray */
}

.sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 20px;
    cursor: pointer;
}

main {
    margin-top: 20px;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 10px;
    min-height: 20vh; /*was 70vh*/
}

.banner {
    width: 100%;
    height: 200px;
    background-color: #555;
    border-radius: 10px;
    margin-bottom: 20px;
}

.banner-image {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.content {
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 10px;
}

footer {
    margin-top: 20px;
    padding: 10px;
    background-color: #2a2a2a;
    text-align: center;
    border-radius: 10px;
    font-size: 0.9em;
}

footer a {
    color: #cccccc; /* Medium gray */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline; /* Simple underline on hover instead of background change */
}

footer a:visited {
    color: #cccccc; /* Ensures visited links stay medium gray */
}

/* login styles*/
.container-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 10px;
    min-height: 70vh;
}

.input-area button:disabled {
    background-color: #3a3a3a;
    cursor: not-allowed;
}

.login-heading {
    margin: 0;
    text-align: center;
    margin-bottom: 20px;
}

.error-message {
    color: #ff5555;
    margin-top: 10px;
    text-align: center;
}

/* Base chatbox styles */
.chatbox {
    width: 100%;
    max-width: 800px;
    height: 60vh; 
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
    opacity: 0.5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

/* For chat.html */
.chat-container .chatbox.active {
    opacity: 1;
    pointer-events: auto;
}
/* For the-table.html */
.table-container .chatbox {
    height: 40vh;
    margin-top: 20px;
    opacity: 1; 
    pointer-events: auto;
}

/* Chat Page Specific Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dropdown {
    padding: 10px;
    background-color: #3a3a3a;
    border: none;
    color: #f0f0f0;
    border-radius: 5px;
    font-family: 'Delius', cursive;
}

.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
}

.message.sent {
    background-color: #4a4a4a;
    align-self: flex-end;
    margin-left: auto;
}

.message.received {
    background-color: #2a2a2a;
    align-self: flex-start;
}

.input-area {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 800px;
}

.input-area input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #3a3a3a;
    color: #f0f0f0;
    font-family: 'Delius', cursive;
}

.input-area button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4a4a4a;
    color: #f0f0f0;
    cursor: pointer;
    font-family: 'Delius', cursive;
}

.clear-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4a4a4a;
    color: #f0f0f0;
    cursor: pointer;
    font-family: 'Delius', cursive;
}

.clear-button:disabled {
    background-color: #3a3a3a;
    cursor: not-allowed;
}

.clear-button:hover:not(:disabled) {
    background-color: #5a5a5a;
}

/* The Table styles */
.table-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: #2a2a2a;
    border-radius: 10px;
    min-height: 70vh;
}

.controls {
    display: flex;
    gap: 10px;
}

.controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4a4a4a;
    color: #f0f0f0;
    cursor: pointer;
    font-family: 'Delius', cursive;
}

.controls button:hover {
    background-color: #5a5a5a;
}

.table-image {
    width: 50%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Table Area Adjustment */
.table-area {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px; /* Move down to avoid overlap with buttons */
}

/* Character Popup Styles */
.character-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.character-menu {
    position: relative;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    width: 50%; /* Smaller than before (was 80%) */
    max-height: 70vh; /* Slightly smaller max height */
    display: flex;
    flex-direction: column;
}

.character-grid {
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    text-align: center;
}

.character-item {
    cursor: pointer;
}

.character-item:hover {
    background-color: #3a3a3a;
    border-radius: 5px;
}

.character-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.character-item span {
    display: block;
    margin-top: 5px;
    color: #f0f0f0;
    font-family: 'Delius', cursive;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 24px;
    cursor: pointer;
}

/* Chair Container Styles */
.chair-container {
    position: absolute;
    width: 35%;
    max-width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chair {
    width: 100%;
    height: auto;
}

.character-overlay {
    position: absolute;
    width: 50%;
    height: auto;
    top: 10%;
    transform: translateY(-50%);
}

.message .character-name {
    display: inline-block;
    background-color: #4a4a4a;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.input-area {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 800px;
}

.input-area input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #3a3a3a;
    color: #f0f0f0;
    font-family: 'Delius', cursive;
}

.input-area button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #4a4a4a;
    color: #f0f0f0;
    cursor: pointer;
    font-family: 'Delius', cursive;
}

.input-area button:hover {
    background-color: #5a5a5a;
}

/* Acknowledgments Page Specific Styles */
main ul {
    padding-left: 20px;
}

main li a {
    color: #cccccc; /* Medium gray */
    text-decoration: none;
}

main li a:hover {
    text-decoration: underline;
}

main li a:visited {
    color: #cccccc; /* Ensures visited links stay medium gray */
}

main a {
    color: #cccccc; /* Medium gray for any other links in main */
}

main a:visited {
    color: #cccccc; /* Ensures visited links stay medium gray */
}

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }
    .sidebar-toggle {
        display: block;
    }
    .sidebar {
        display: block;
    }
}

@media (min-width: 901px) {
    .sidebar {
        display: none;
    }
}