body {
    background-image: url('background.png');
    background-color: #C0C0C0;
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #000;
}

#setup-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000; /* Highest z-index */
}

#setup-video {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

a {
    color: #0000FF;
}

a:visited {
    color: #800080;
}

.hidden {
    visibility: hidden;
    opacity: 0;
}

/* Login Page Styles */
#login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Login_Screen_Background.png');
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    z-index: -1;
}

.login-box {
    width: 90%;
    max-width: 450px;
    text-align: center;
    background-color: #DFDFDF;
}

.login-logo {
    max-width: 80%;
    margin-bottom: 10px;
}

.login-text-header {
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
}
.login-text-subheader {
    font-size: 16px;
    margin: 5px 0 15px 0;
}
.login-text-prompt {
    font-size: 18px;
    margin: 15px 0;
}

.login-input {
    width: 90%;
    padding: 8px;
    margin-bottom: 10px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    border: 2px inset #C0C0C0;
    background-color: #FFF;
}

.login-button {
    width: 90%;
    padding: 10px;
    margin-top: 5px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'VT323', monospace;
    font-size: 18px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.login-button:active {
    border-style: inset;
}

.websim-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #cce5ff;
}

.websim-button img {
    height: 24px;
    width: 24px;
}

/* Win95 Popup Styles */
.win95-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    border: 2px outset #C0C0C0;
    background-color: #C0C0C0;
    z-index: 10001;
    font-size: 16px;
}

.title-bar {
    background-color: #000080; /* Dark blue */
    color: #FFFFFF;
    padding: 3px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.title-bar-controls button {
    background-color: #C0C0C0;
    border: 2px outset #C0C0C0;
    font-family: 'VT323', monospace;
    width: 20px;
    height: 20px;
    padding: 0;
    cursor: pointer;
}

.title-bar-controls button:active {
    border-style: inset;
}

.window-body {
    padding: 20px;
    text-align: center;
}

/* XP Loader Popup */
#xp-loader-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    z-index: 10002;
    text-align: center;
}

#xp-loader-popup .panel {
    background-color: #ece9d8;
    border: 1px solid #003c74;
    padding: 20px;
}

#xp-loader-text {
    font-size: 18px;
    color: #000;
    margin-bottom: 15px;
}

.xp-loading-bar-container {
    height: 20px;
    border: 1px solid #808080;
    padding: 2px;
}

.xp-loading-bar {
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        -45deg,
        #3c78c8,
        #3c78c8 10px,
        #448ae0 10px,
        #448ae0 20px
    );
    background-size: 40px 40px;
    animation: xp-load 0.8s linear infinite;
}

@keyframes xp-load {
    from { background-position: 0 0; }
    to { background-position: 40px 0; }
}

/* Fullscreen Fade Message */
#fullscreen-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #DFDFDF;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10003;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
#fullscreen-fade.visible {
    opacity: 1;
}

#fullscreen-fade-text {
    font-size: 28px;
    font-weight: bold;
}

/* Logout Confirmation */
#logout-confirm-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5000;
    width: 300px;
}

#logout-confirm-popup h3 {
    margin-top: 0;
}

.logout-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.popup-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}
.popup-button:active {
    border-style: inset;
}

.logout-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}
.logout-button:active {
    border-style: inset;
}

.main-layout {
    width: 90%;
    max-width: 1200px;
    margin: 15px auto;
    border-collapse: collapse;
    border: 2px outset #C0C0C0;
    background-color: #C0C0C0;
    transition: max-width 0.3s ease-in-out;
}

.main-layout.in-game {
    max-width: 100%;
    width: 100%;
}

.header {
    text-align: center;
    padding: 8px;
}

.header > td {
    position: relative;
}

.header img {
    max-width: 300px;
}

.header-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#song-info-display {
    border: 2px inset #C0C0C0;
    padding: 5px 10px;
    background-color: #DFDFDF;
    font-size: 16px;
    white-space: nowrap;
}

.sound-button {
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 5px;
    cursor: pointer;
    z-index: 10;
}

.sound-button:active {
    border-style: inset;
}

.sound-button img {
    width: 24px;
    height: 24px;
    display: block;
}

.nav-panel {
    width: 160px;
    vertical-align: top;
    padding: 8px;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, width 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.nav-panel.hidden-in-game {
    width: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
}

.main-content {
    vertical-align: top;
    padding: 8px;
}

.panel {
    border: 2px inset #C0C0C0;
    padding: 8px;
    background-color: #DFDFDF;
}

.panel h2, .panel h3 {
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #808080;
    font-size: 22px;
}

.nav-panel ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.nav-panel li {
    margin-bottom: 4px;
}

.new-icon {
    vertical-align: middle;
    width: 28px;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.games-grid {
    width: 100%;
    text-align: center;
}

.games-grid img {
    width: 150px;
    height: 150px;
    border: 2px outset #C0C0C0;
    margin-bottom: 5px;
    background-color: #FFF;
}

.games-grid td {
    padding: 8px;
}

#catalog-panel, #help-panel {
    min-height: 502px; /* Match game canvas height */
}

#catalog-panel h3 {
    margin-top: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #808080;
    font-size: 20px;
}

#solid-color-selector,
.gradient-swatches-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px;
    border: 2px inset #C0C0C0;
    background-color: #C0C0C0;
}

.gradient-color-picker-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.gradient-color-selector {
    flex: 1;
}

.gradient-color-selector p {
    margin: 0 0 5px 0;
    font-weight: bold;
}

#gradient-type-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.gradient-type-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
    flex: 1;
}

.gradient-type-button:active,
.gradient-type-button.selected {
    border-style: inset;
    background-color: #A0A0A0; /* Highlight selection */
}

.color-swatch {
    width: 50px;
    height: 50px;
    border: 3px outset #C0C0C0;
    cursor: pointer;
}

.color-swatch.selected {
    border-style: inset;
    border-color: #0000FF; /* Blue highlight for selection */
    transform: scale(1.1);
}

/* Specific selection for gradient swatches */
.gradient-swatches-container .color-swatch.selected {
    border-style: inset;
    border-color: #FF8C00; /* Darker highlight for gradient color selection */
}

.catalog-buttons, .help-buttons, .profile-buttons {
    margin-top: 15px;
    text-align: right;
}

.catalog-buttons button, .help-buttons button, .profile-buttons button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.catalog-buttons button:active, .help-buttons button:active, .profile-buttons button:active {
    border-style: inset;
}

/* Experimental Panel */
#experimental-panel {
    min-height: 502px;
    text-align: center;
}

.experimental-content {
    margin-top: 40px;
}

.experimental-content h3 {
    font-size: 32px;
    margin-bottom: 20px;
}

.experimental-logo {
    max-width: 300px;
    border: 2px outset #C0C0C0;
    margin-bottom: 20px;
    background-color: #FFF;
}

.experimental-content p {
    font-size: 20px;
}

.experimental-content a {
    font-size: 18px;
    word-break: break-all;
}

.experimental-buttons {
    margin-top: 20px;
    text-align: right;
}

.experimental-buttons button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.experimental-buttons button:active {
    border-style: inset;
}

/* Settings Panel */
#settings-panel {
    min-height: 502px;
    display: none;
    flex-direction: column;
}

.settings-section {
    border: 2px inset #c0c0c0;
    background-color: #c0c0c0;
    padding: 10px;
    margin-bottom: 10px;
}

#settings-panel .settings-section:first-of-type {
    flex-grow: 1;
}

.version-info-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.version-logo {
    max-width: 250px;
    height: auto;
    border: 2px outset #C0C0C0;
    padding: 10px;
    background: #fff;
}

.version-text-container {
    display: flex;
    flex-direction: column;
}

.version-number {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.version-status {
    font-size: 16px;
    margin: 0 0 20px 0;
}

.settings-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
    align-self: flex-start; /* Align button to the left */
}

.settings-button:active {
    border-style: inset;
}

.ad-container {
    text-align: center;
}

#roblox-ad-video {
    max-width: 100%;
    border: 2px outset #C0C0C0;
    background: #000;
}

.ad-slogan {
    font-size: 24px;
    font-weight: bold;
    margin-top: 15px;
    color: #000080;
    text-shadow: 1px 1px #c0c0c0;
}

.settings-buttons {
    margin-top: 20px;
    text-align: right;
}

.settings-buttons button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.settings-buttons button:active {
    border-style: inset;
}

#friends-panel {
    display: none;
    min-height: 502px;
    flex-direction: column;
}

.friends-container {
    display: flex;
    gap: 10px;
    flex-grow: 1;
}

.friends-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.friends-list-box {
    border: 2px inset #c0c0c0;
    background-color: #c0c0c0;
    padding: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.friend-item, .request-item {
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friend-item img, .request-item img {
    width: 32px;
    height: 32px;
    border: 1px solid #808080;
}

.friend-item-info, .request-item-info {
    flex-grow: 1;
}

.friend-item-info p, .request-item-info p {
    margin: 0;
    font-size: 18px;
}

.request-item-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.request-button {
    padding: 2px 8px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.request-button.accept {
    /* background-color: #a0d0a0; */
}
.request-button.ignore {
    /* background-color: #f0a0a0; */
}

.request-button:active {
    border-style: inset;
}

.friends-buttons {
    margin-top: 15px;
    text-align: right;
}

.friends-buttons button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.friends-buttons button:active {
    border-style: inset;
}

/* Messages Panel */
#messages-panel {
    min-height: 502px;
    display: flex;
    flex-direction: column;
}

.messages-layout {
    display: flex;
    flex-grow: 1;
    gap: 10px;
    overflow: hidden; /* Prevent chat from overflowing */
}

.messages-friend-list {
    width: 200px;
    flex-shrink: 0;
    border: 2px inset #c0c0c0;
    background-color: #c0c0c0;
    padding: 8px;
    overflow-y: auto;
}

.messages-friend-item {
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.messages-friend-item:hover, .messages-friend-item.selected {
    border-color: #0000FF;
}

.messages-friend-item.selected {
    border-style: inset;
}

.messages-friend-item img {
    width: 32px;
    height: 32px;
    border: 1px solid #808080;
}

.messages-friend-item p {
    margin: 0;
    font-size: 18px;
    flex-grow: 1;
}

.messages-chat-window {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border: 2px inset #c0c0c0;
    background-color: #DFDFDF;
    padding: 8px;
}

.chat-header {
    padding-bottom: 5px;
    border-bottom: 2px solid #808080;
    margin-bottom: 10px;
}

.chat-header h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 22px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #c0c0c0;
    border: 2px inset #c0c0c0;
    padding: 8px;
    margin-bottom: 8px;
}

.message-item {
    margin-bottom: 6px;
    max-width: 80%;
    padding: 5px 8px;
    word-break: break-word;
    border: 2px outset #C0C0C0;
}

.message-item.sent {
    background-color: #a0d0f0; /* Light blue */
    margin-left: auto;
    text-align: right;
}

.message-item.received {
    background-color: #e9e9e9; /* Light grey */
    margin-right: auto;
    text-align: left;
}

.message-item p {
    margin: 0;
    font-size: 16px;
}

.chat-input-form {
    display: flex;
    gap: 8px;
}

#message-input {
    flex-grow: 1;
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 5px;
    border: 2px inset #C0C0C0;
    background-color: #FFF;
    resize: vertical;
}

#send-message-btn {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

#send-message-btn:active {
    border-style: inset;
}

.messages-buttons {
    margin-top: 15px;
    text-align: right;
}

.messages-buttons button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.messages-buttons button:active {
    border-style: inset;
}

.error-message {
    color: #FF0000;
    font-size: 16px;
    margin-top: 5px;
    text-align: center;
    background: #ffcccc;
    border: 1px solid #FF0000;
    padding: 3px;
}

#profile-panel {
    min-height: 502px; /* Match other panels */
    display: flex;
    flex-direction: column;
}

.profile-main-content {
    display: flex;
    gap: 10px;
    flex-grow: 1; /* Allows this section to fill the space */
    margin-bottom: 10px;
}

.profile-preview-container {
    text-align: center;
    border: 2px outset #C0C0C0;
    padding: 15px;
    background-color: #c0c0c0;
}

.profile-details-container {
    flex: 1; /* Takes up remaining space */
    display: flex;
    flex-direction: column;
}

.profile-details-container h3 {
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #808080;
    font-size: 22px;
}

#profile-description {
    background-color: #c0c0c0;
    border: 2px inset #C0C0C0;
    padding: 10px;
    min-height: 120px;
    white-space: pre-wrap; /* To respect newlines */
    word-break: break-word;
    flex-grow: 1;
    margin-top: 5px;
    margin-bottom: 10px; /* Adjusted margin */
}

#description-editor {
    display: none; /* Initially hidden */
    flex-grow: 1;
    display: none;
    flex-direction: column;
}

#description-editor textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 5px;
    border: 2px inset #C0C0C0;
    background-color: #FFF;
    resize: vertical;
    margin-top: 5px;
    flex-grow: 1;
}

.profile-search-container {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    border-bottom: 2px solid #808080;
    padding-bottom: 8px;
}

#player-search-input {
    flex-grow: 1;
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 5px;
    border: 2px inset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
    margin-top: 8px;
}

#player-search-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

#player-search-button:active {
    border-style: inset;
}

#send-friend-request-button {
    /* background-color: #a0d0a0; */
}

#send-friend-request-button:disabled {
    background-color: #b0b0b0;
    cursor: not-allowed;
}

.profile-action-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
    margin-top: 10px;
    align-self: flex-start; /* Align button to the left */
}

.profile-action-button:active {
    border-style: inset;
}

#game-container {
    position: relative;
    width: 100%;
}

#game-area {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 3; /* 800 / 480 */
    background-color: #000;
    border: 2px inset #C0C0C0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#game-area:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    border: none;
    max-width: none;
    margin: 0;
}

#game-canvas {
    width: 100%;
    height: 100%;
    background-color: #55aaff; /* Light blue sky */
    display: block;
}

#joystick-container {
    position: absolute;
    bottom: 30px;
    left: 100px;
    width: 200px;
    height: 200px;
    transform: translateX(-50%);
    display: none; /* Hidden by default */
}

#jump-button {
    position: absolute;
    bottom: 60px;
    right: 40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #ff4136; /* Red */
    color: white;
    font-family: 'VT323', monospace;
    font-size: 24px;
    font-weight: bold;
    border: 2px outset #C0C0C0;
    cursor: pointer;
    box-shadow: 0px 5px 0px #b21e1e;
    transition: all 0.05s ease-in-out;
}

#jump-button:active {
    transform: translateY(3px);
    box-shadow: 0px 2px 0px #b21e1e;
}

#attack-button {
    position: absolute;
    bottom: 120px; /* Position above JUMP button */
    right: 40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #6495ED; /* Cornflower Blue */
    color: white;
    font-family: 'VT323', monospace;
    font-size: 24px;
    font-weight: bold;
    border: 2px outset #C0C0C0;
    cursor: pointer;
    box-shadow: 0px 5px 0px #34495e;
    transition: all 0.05s ease-in-out;
    z-index: 10;
}

#attack-button:active {
    transform: translateY(3px);
    box-shadow: 0px 2px 0px #34495e;
}

#fullscreen-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    z-index: 15; /* Above joystick but below overlays */
}

#fullscreen-button:active {
    border-style: inset;
}

#fullscreen-button.fullscreen-active {
     background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>');
}

#game-top-left-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

#game-top-right-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

.game-ui-btn {
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px outset #C0C0C0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    position: relative;
}

.game-ui-btn:active {
    border-style: inset;
}

.game-ui-btn img {
    width: 24px;
    height: 24px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: white;
    margin: 2px 0;
}

#chat-notification-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background-color: #ff4136;
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid white;
}

#game-leaderboard-panel {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 220px;
    max-height: calc(100% - 120px);
    overflow-y: auto;
    background-color: rgba(192, 192, 192, 0.9);
    z-index: 90;
    border: 2px outset #C0C0C0;
}

#leaderboard-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#leaderboard-list li {
    padding: 5px;
    border-bottom: 1px solid #808080;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.leaderboard-player-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    margin-bottom: 4px;
}

.leaderboard-player-info img {
    width: 20px;
    height: 20px;
    border: 1px solid #444;
}

.leaderboard-player-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.health-bar-container {
    height: 6px;
    background-color: #555;
    border: 1px solid #000;
    width: 100%;
    margin-top: 4px;
}

.health-bar {
    height: 100%;
    background-color: #2ECC40;
    transition: width 0.2s linear;
}

#game-chat-panel {
    position: absolute;
    top: 60px;
    left: 10px;
    width: 280px;
    background-color: rgba(192, 192, 192, 0.9);
    z-index: 90;
    display: flex;
    flex-direction: column;
}

#chat-display {
    height: 180px;
    border: 2px inset #c0c0c0;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 5px;
    margin-bottom: 5px;
    overflow-y: auto;
    word-break: break-word;
}

#chat-display p {
    margin: 0 0 5px 0;
    font-size: 14px;
}

#chat-display p strong {
    font-weight: bold;
}

#chat-form {
    display: flex;
    gap: 5px;
}

#chat-input {
    flex-grow: 1;
    font-family: 'VT323', monospace;
    font-size: 14px;
    padding: 3px;
    border: 2px inset #C0C0C0;
    background-color: #FFF;
}

#chat-send-btn {
    padding: 3px 8px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

#chat-send-btn:active {
    border-style: inset;
}

.footer {
    text-align: center;
    font-size: 14px;
    padding: 5px;
    border-top: 2px solid #808080;
}

.news-ticker {
    width: 100%;
    overflow: hidden;
    background: #ffff00;
    border: 1px solid #000;
    margin-top: 8px;
}

.news-ticker p {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 15s linear infinite;
    margin: 2px 0;
    white-space: nowrap;
}

@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Loading Screen */
#game-loading-screen {
    display: none; /* Hidden by default, changed to 'flex' via JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 502px; /* Matches canvas height + padding */
    background-color: #000000;
    color: #FFFFFF;
    border: 2px inset #C0C0C0;
    text-align: center;
    font-size: 24px;
}

.loading-bar-container {
    width: 80%;
    max-width: 400px;
    height: 25px;
    border: 2px solid #C0C0C0;
    margin-top: 15px;
    padding: 3px;
    background-color: #444;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background-color: #00FF00; /* Bright green */
}

.loading-bar.loading {
    animation: loading-animation 2s linear forwards;
}

@keyframes loading-animation {
    from { width: 0%; }
    to { width: 100%; }
}

/* Tycoon Game Overlays */
.game-overlay {
    position: absolute;
    top: 2px; /* Account for canvas border */
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background-color: rgba(0, 0, 0, 0.95);
    color: white;
    display: none; /* Controlled by JS */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    font-size: 28px;
    box-sizing: border-box;
}

#tycoon-intro-screen.fade-out {
    animation: fadeOut 1.5s ease-out forwards;
}

#tycoon-title-screen h1 {
    font-size: 48px;
    color: #FFDC00; /* Yellow */
    text-shadow: 3px 3px #FF4136; /* Red */
}

#tycoon-play-button {
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 24px;
    border: 2px outset #C0C0C0;
    background-color: #2ECC40; /* Green */
    cursor: pointer;
    margin-top: 20px;
}

#tycoon-play-button:active {
    border-style: inset;
}

#tycoon-ui-container {
    display: none; /* This is no longer used, purchase pads are in-world */
}

.tycoon-button {
    padding: 8px 15px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.tycoon-button:active {
    border-style: inset;
}

#plot-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 15px;
    padding: 8px;
    width: 90%;
    max-width: 700px;
}

.plot-selection-box {
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    color: #000; /* Black text for readability */
    font-size: 18px; /* Smaller font to fit inside button */
}

.plot-selection-box:hover {
    border-color: #0000FF;
}

.plot-selection-box.taken {
    background-color: #808080;
    cursor: not-allowed;
    color: #333;
    border-style: inset;
}

.plot-selection-box p {
    margin: 0;
}

.plot-selection-box .plot-owner {
    margin-top: 4px;
    font-size: 16px; /* Slightly smaller for the status */
    font-weight: bold;
}

.plot-selection-box.taken .plot-owner {
    color: #a55;
}

/* Forum Panel */
#forum-panel {
    min-height: 502px;
    display: flex;
    flex-direction: column;
}

#forum-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Add scroll for content if it overflows */
}

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #808080;
}

.forum-header h2 {
    margin: 0;
    padding: 0;
    border: none;
}

.forum-header-buttons {
    display: flex;
    gap: 10px;
}

.forum-button {
    padding: 5px 10px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
}

.forum-button.delete-button {
    background-color: #FF4136;
}

.forum-button:active {
    border-style: inset;
}

.forum-buttons {
    margin-top: 10px;
    text-align: right;
}

#forum-posts-list {
    flex-grow: 1;
    overflow-y: auto;
    border: 2px inset #c0c0c0;
    background-color: #c0c0c0;
    padding: 8px;
}

.forum-post-item {
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-post-item:hover {
    border-color: #0000FF;
}

.forum-post-item-main {
    flex-grow: 1;
    cursor: pointer;
}

.forum-post-item-controls {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.forum-post-item h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
}

.forum-post-item p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.delete-post-btn {
    background-color: #FF4136;
    color: white;
    border: 2px outset #c0c0c0;
    font-family: 'VT323', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: 10px;
    line-height: 1;
}

.delete-post-btn:active {
    border-style: inset;
}

#forum-create-post-view .forum-input-group,
#forum-edit-post-view .forum-input-group,
#forum-single-post-view .forum-reply-form {
    margin-top: 10px;
}

#forum-create-post-view label,
#forum-edit-post-view label,
#forum-single-post-view label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#forum-create-post-view input,
#forum-create-post-view textarea,
#forum-edit-post-view input,
#forum-edit-post-view textarea,
#forum-single-post-view textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 5px;
    border: 2px inset #C0C0C0;
    background-color: #FFF;
}

#forum-single-post-view {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.single-post-content, .single-post-replies {
    border: 2px inset #c0c0c0;
    background-color: #c0c0c0;
    padding: 10px;
    margin-bottom: 10px;
}

.single-post-content h3 {
    margin-top: 0;
    font-size: 24px;
}

.single-post-content p {
    white-space: pre-wrap;
    word-break: break-word;
}

.single-post-author {
    font-size: 14px;
    color: #555;
    margin-top: 10px;
}

.single-post-replies {
    flex-grow: 1;
    overflow-y: auto;
}

.reply-item {
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 8px;
    margin-bottom: 8px;
    position: relative; /* For positioning delete button */
}

.reply-item p {
     margin: 0;
     white-space: pre-wrap;
     word-break: break-word;
}

.delete-reply-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #FF4136;
    color: white;
    border: 2px outset #c0c0c0;
    font-family: 'VT323', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0px 6px;
    line-height: 1;
}

.delete-reply-btn:active {
    border-style: inset;
}

#level-transition-overlay {
    background-color: #000;
    overflow: hidden; /* Hide text when it slides out */
}

#level-transition-text {
    position: relative;
    font-size: 48px;
    color: white;
    text-shadow: 2px 2px #808080;
    transform: translateX(-200%); /* Start off-screen to the left */
}

#level-transition-text.slide-in {
    animation: slide-in-out 3.5s ease-in-out forwards;
}

@keyframes slide-in-out {
    0% { transform: translateX(200%); } /* Start right */
    20% { transform: translateX(0); }   /* Slide to center */
    80% { transform: translateX(0); }   /* Hold in center */
    100% { transform: translateX(-200%); } /* Slide out left */
}

/* Intro Screen */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png');
    background-color: #C0C0C0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
}

#intro-screen.fade-out {
    animation: fadeOut 1s ease-out forwards;
}

.intro-logo {
    max-width: 450px;
}

.intro-text {
    font-size: 28px;
    margin-top: 20px;
    letter-spacing: 3px;
    text-shadow: 2px 2px #808080;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* Game Details Popup */
#game-details-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    z-index: 5000;
}

.game-details-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.game-details-left {
    flex-shrink: 0;
}

.game-details-left img {
    width: 200px;
    height: 200px;
    border: 2px outset #C0C0C0;
    background-color: #FFF;
}

.game-details-right {
    flex-grow: 1;
}

.single-post-image {
    max-width: 100%;
    max-height: 400px;
    margin-top: 10px;
    border: 2px outset #C0C0C0;
}

/* NEW: Style for the custom file upload button */
.forum-input-group > label.forum-button {
    display: inline-block;
    margin-top: 5px;
}

#game-details-creator {
    margin-top: 20px;
    font-weight: bold;
}

.game-details-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Statement Popup */
#statement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    z-index: 5001;
    text-align: center;
}

#statement-popup img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border: 2px outset #C0C0C0;
}

.statement-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* --- Dark Mode --- */
body.dark-mode {
    background-color: #212121;
    color: #E0E0E0;
    background-image: none; /* Hide noisy background in dark mode */
}

body.dark-mode a {
    color: #87CEFA; /* Light Sky Blue */
}

body.dark-mode a:visited {
    color: #DDA0DD; /* Plum */
}

/* Panels and Borders */
body.dark-mode .panel,
body.dark-mode .login-box,
body.dark-mode #logout-confirm-popup {
    background-color: #333333;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .main-layout {
    background-color: #2a2a2a;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
}

/* Buttons */
body.dark-mode .login-button,
body.dark-mode .sound-button,
body.dark-mode .popup-button,
body.dark-mode .logout-button,
body.dark-mode .catalog-buttons button,
body.dark-mode .help-buttons button,
body.dark-mode .profile-buttons button,
body.dark-mode .profile-action-button,
body.dark-mode .friends-buttons button,
body.dark-mode .messages-buttons button,
body.dark-mode .settings-buttons button,
body.dark-mode #player-search-button,
body.dark-mode .request-button,
body.dark-mode #send-message-btn,
body.dark-mode #leave-game-button,
body.dark-mode .forum-button,
body.dark-mode #chat-send-btn,
body.dark-mode #tycoon-play-button {
    background-color: #444444;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
}

body.dark-mode .login-button:active,
body.dark-mode .sound-button:active,
body.dark-mode .popup-button:active,
body.dark-mode .logout-button:active,
body.dark-mode .catalog-buttons button:active,
body.dark-mode .help-buttons button:active,
body.dark-mode .profile-buttons button:active,
body.dark-mode .profile-action-button:active,
body.dark-mode .friends-buttons button:active,
body.dark-mode .messages-buttons button:active,
body.dark-mode .settings-buttons button:active,
body.dark-mode #player-search-button:active,
body.dark-mode .request-button:active,
body.dark-mode #send-message-btn:active,
body.dark-mode #leave-game-button:active,
body.dark-mode .forum-button:active,
body.dark-mode #chat-send-btn:active,
body.dark-mode #tycoon-play-button:active {
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .websim-button {
    background-color: #1a2a4a;
}

/* Inputs and Textareas */
body.dark-mode .login-input,
body.dark-mode #player-search-input,
body.dark-mode #description-editor textarea,
body.dark-mode #message-input,
body.dark-mode #chat-input,
body.dark-mode #forum-create-post-view input,
body.dark-mode #forum-create-post-view textarea,
body.dark-mode #forum-edit-post-view input,
body.dark-mode #forum-edit-post-view textarea,
body.dark-mode #forum-single-post-view textarea {
    background-color: #2a2a2a;
    color: #E0E0E0;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

/* Headers and Borders */
body.dark-mode .panel h2, 
body.dark-mode .panel h3,
body.dark-mode .footer,
body.dark-mode .profile-search-container,
body.dark-mode .chat-header {
    border-bottom-color: #555555;
}

body.dark-mode #ko-title,
body.dark-mode #bucks-leaderboard h3,
body.dark-mode #chat-box h3 {
     border-bottom-color: #555555;
}

/* Specific Components */
body.dark-mode .news-ticker {
    background: #000080;
    color: #ffff00;
}

body.dark-mode #song-info-display {
    background-color: #2a2a2a;
    color: #E0E0E0;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .games-grid img,
body.dark-mode .game-details-left img,
body.dark-mode .version-logo,
body.dark-mode .experimental-logo,
body.dark-mode #roblox-ad-video,
body.dark-mode #statement-popup img {
    border-color: #555555 #1a1a1a #1a1a1a #555555;
    background-color: #1a1a1a;
}

body.dark-mode #color-selector,
body.dark-mode .friends-list-box,
body.dark-mode .messages-friend-list,
body.dark-mode .chat-messages,
body.dark-mode #chat-display,
body.dark-mode #profile-description,
body.dark-mode #profile-canvas,
body.dark-mode .settings-section,
body.dark-mode #forum-posts-list,
body.dark-mode .single-post-content, 
body.dark-mode .single-post-replies {
    background-color: #2a2a2a;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .color-swatch,
body.dark-mode .friend-item, 
body.dark-mode .request-item,
body.dark-mode .messages-friend-item,
body.dark-mode .forum-post-item,
body.dark-mode .reply-item {
    background-color: #333333;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
}

body.dark-mode .message-item.sent {
    background-color: #1a3a5a;
}

body.dark-mode .message-item.received {
    background-color: #4a4a4a;
}

body.dark-mode .friend-item img, 
body.dark-mode .request-item img,
body.dark-mode .messages-friend-item img,
body.dark-mode #player-list img {
    border-color: #555555;
}

body.dark-mode .color-swatch.selected {
    border-color: #87CEFA; /* Light Sky Blue */
}

body.dark-mode .gradient-swatches-container .color-swatch.selected {
    border-color: #FF8C00; /* Darker highlight for gradient color selection */
}

body.dark-mode .plot-selection-box {
    background-color: #444444;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
    color: #E0E0E0;
}

body.dark-mode .plot-selection-box.taken {
    background-color: #2a2a2a;
    color: #888;
    border-style: inset;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .plot-selection-box.taken .plot-owner {
    color: #a55;
}

body.dark-mode .gradient-type-button {
    background-color: #444444;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
}

body.dark-mode .gradient-type-button.selected {
    background-color: #666666;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .plot-selection-box.taken .plot-owner {
    color: #a55;
}

/* Win95 Popup */
body.dark-mode .win95-window {
    background-color: #C0C0C0;
    border: 2px outset #C0C0C0;
    color: #000;
}

body.dark-mode .title-bar-controls button {
    background-color: #C0C0C0;
    border-color: #C0C0C0; /* Revert from dark mode style */
    border-style: outset;
    border-width: 2px;
}

/* XP Loader */
body.dark-mode #xp-loader-popup .panel {
    background-color: #2a2a2a;
    border-color: #87CEFA;
}
body.dark-mode #xp-loader-text {
    color: #E0E0E0;
}
body.dark-mode .xp-loading-bar-container {
    border-color: #555;
}

#door-sound-overlay {
    background-color: transparent;
    pointer-events: none; /* Make it non-interactive */
}

/* --- Mobile Mode Adjustments --- */
body.mobile-mode .main-layout {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: none;
    font-size: 16px; /* Slightly smaller base font */
}

body.mobile-mode .header {
    padding: 5px;
}

body.mobile-mode .header > td {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.mobile-mode .header img {
    max-width: 200px;
}

body.mobile-mode .sound-button {
    top: 5px;
    right: 5px;
}

body.mobile-mode .news-ticker {
    width: 98%; /* A bit of padding */
}

/* This will cause nav and content to stack */
body.mobile-mode .main-layout > tbody > tr {
    display: flex;
    flex-direction: column;
}

body.mobile-mode .nav-panel {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    order: 2; /* Move nav below content */
}

body.mobile-mode .main-content {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    order: 1; /* Move content above nav */
}

body.mobile-mode .nav-panel ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

body.mobile-mode .nav-panel li {
    margin-bottom: 0;
}

body.mobile-mode .panel {
    padding: 8px;
}

body.mobile-mode .games-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.mobile-mode .games-grid td {
    padding: 5px;
    width: 80%;
}

body.mobile-mode .games-grid img {
    width: 100%;
    height: auto;
}

body.mobile-mode #game-container {
    flex-direction: column;
}

body.mobile-mode #player-list-container {
    width: 100%;
    box-sizing: border-box;
    height: auto;
    order: 2; /* Show below game */
}

body.mobile-mode #game-area {
    order: 1; /* Show above player list */
}

body.mobile-mode #game-canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 1.5; /* Maintain a reasonable aspect ratio */
}

body.mobile-mode #joystick-container {
    bottom: 15px;
    left: 70px;
    width: 120px;
    height: 120px;
}

body.mobile-mode #jump-button {
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    font-size: 20px;
}

body.mobile-mode #attack-button {
    bottom: 110px;
    right: 20px;
    width: 80px;
    height: 80px;
    font-size: 16px;
}

body.dark-mode #fullscreen-button {
    background-color: #444444;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>');
}

body.dark-mode #fullscreen-button.fullscreen-active {
     background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>');
}

/* Events Panel styles, similar to Forum */
#events-panel {
    min-height: 502px;
    display: flex;
    flex-direction: column;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #808080;
}

.events-header h2 {
    margin: 0;
    padding: 0;
    border: none;
}

.events-header-buttons {
    display: flex;
    gap: 10px;
}

.events-content {
    display: flex;
    gap: 10px;
    flex-grow: 1;
    overflow: hidden;
}

.events-category-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.events-list-box {
    border: 2px inset #c0c0c0;
    background-color: #c0c0c0;
    padding: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.event-item {
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.event-item:hover {
    border-color: #0000FF;
}

.event-item-info {
    flex-grow: 1;
}

.event-item img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border: 2px outset #C0C0C0;
    background-color: #FFF;
}

.event-item h4 {
    margin: 0;
    font-size: 18px;
}

.event-item p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.event-item-controls {
    display: flex;
    gap: 5px;
}

.event-button, .edit-event-btn, .delete-event-btn {
    padding: 3px 8px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    border: 2px outset #C0C0C0;
    background-color: #DFDFDF;
    cursor: pointer;
    line-height: 1;
}
.delete-event-btn {
    background-color: #FF4136;
    color: white;
}

.event-button:active, .edit-event-btn:active, .delete-event-btn:active {
    border-style: inset;
}

/* Dark Mode Overrides for Events Panel */
body.dark-mode #events-panel .events-list-box {
    background-color: #2a2a2a;
    border-color: #1a1a1a #555555 #555555 #1a1a1a;
}

body.dark-mode .event-item {
    background-color: #333333;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
}

body.dark-mode .event-item img {
     background-color: #1a1a1a;
     border-color: #555555 #1a1a1a #1a1a1a #555555;
}

body.dark-mode .event-item p {
    color: #a0a0a0;
}

body.dark-mode .event-button, body.dark-mode .edit-event-btn, body.dark-mode .delete-event-btn {
    background-color: #444444;
    border-color: #555555 #1a1a1a #1a1a1a #555555;
}
body.dark-mode .delete-event-btn {
    background-color: #800000;
}

#pause-menu-overlay {
    z-index: 200; /* Ensure it covers all other game UI like leaderboard and chat */
}

.pause-menu-content {
    display: flex;
    flex-direction: column;
    width: 380px;
    max-height: 80%;
    background-color: #DFDFDF;
    border: 2px outset #C0C0C0;
    padding: 15px;
}

.pause-menu-content h3 {
    text-align: center;
    margin-bottom: 15px;
}

.pause-menu-players-list {
    flex-grow: 1;
    overflow-y: auto;
    border: 2px inset #C0C0C0;
    background-color: #C0C0C0;
    margin-bottom: 15px;
    max-height: 250px;
}

#pause-menu-players {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.pause-player-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #808080;
    background-color: #DFDFDF;
    gap: 10px;
}

.pause-player-item img {
    width: 36px;
    height: 36px;
    border: 1px solid #444;
}

.pause-player-item span {
    flex-grow: 1;
    font-size: 18px;
    font-weight: bold;
}

.pause-menu-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pause-menu-buttons button {
    flex: 1;
}

.add-friend-mini-btn {
    padding: 4px 8px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    background-color: #2ECC40;
    color: white;
    border: 2px outset #C0C0C0;
    cursor: pointer;
}

.add-friend-mini-btn:disabled {
    background-color: #888;
    cursor: default;
}

.add-friend-mini-btn:active {
    border-style: inset;
}