body {
    font-family: "Courier New", monospace;
    background-color: #000;
    color: #00FF00;
    margin: 0;
    padding: 0;
    text-shadow: 0 0 5px currentColor;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Settings Menu - Fixed positioning */
#settings-menu {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border: 2px solid #00FF00;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    z-index: 1000;
    width: 220px;
    max-height: 200px;
    overflow-y: auto;
    box-sizing: border-box;
}

#settings-menu label {
    color: inherit;
    margin-right: 15px;
    text-shadow: 0 0 3px currentColor;
    display: block;
    margin-bottom: 5px;
}

#settings-menu select {
    background: #000;
    color: #00FF00;
    border: 2px solid #00FF00;
    padding: 5px;
    margin-bottom: 10px;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
    width: 100%;
}

#settings-menu input[type="checkbox"] {
    margin-right: 5px;
    transform: scale(1.2);
}

/* ASCII Art Styling */
.ascii-title {
    font-family: "Courier New", monospace;
    white-space: pre;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    margin: 5px 0;
    text-shadow: 0 0 8px currentColor;
    color: inherit;
    height: 90px;
    overflow: hidden;
    flex: 1;
    margin: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: calc(100vw - 300px);
}

/* Theme Classes with 90s Aesthetic */
body.hacker {
    background: linear-gradient(45deg, #000, #001100, #000);
    color: #00FF00;
    font-family: "Courier New", monospace;
    text-shadow: 0 0 8px #00FF00;
    border: 3px solid #00FF00;
    box-shadow: inset 0 0 50px rgba(0, 255, 0, 0.1);
}
body.hacker.with-gradient {
    background: linear-gradient(45deg, #000, #001100, #003300, #001100, #000);
}

body.skyblue {
    background: linear-gradient(135deg, #87CEEB, #B0E0E6, #ADD8E6);
    color: #003366;
    font-family: "Arial", sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    border: 3px solid #4682B4;
    box-shadow: inset 0 0 50px rgba(135, 206, 235, 0.3);
}
body.skyblue.with-gradient {
    background: linear-gradient(135deg, #87CEEB, #B0E0E6, #ADD8E6, #87CEEB);
}

body.icecream {
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB, #FFE4E1);
    color: #8B4513;
    font-family: "Comic Sans MS", cursive;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    border: 3px solid #FF69B4;
    box-shadow: inset 0 0 50px rgba(255, 182, 193, 0.4);
}
body.icecream.with-gradient {
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB, #FFE4E1, #FFB6C1);
}

body.sakura {
    background: linear-gradient(135deg, #FFE4E1, #FFB6C1, #FFC0CB);
    color: #DC143C;
    font-family: "Segoe UI", sans-serif;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.7);
    border: 3px solid #FF1493;
    box-shadow: inset 0 0 50px rgba(255, 182, 193, 0.3);
}
body.sakura.with-gradient {
    background: linear-gradient(135deg, #FFE4E1, #FFB6C1, #FFC0CB, #FFE4E1);
}

body.anime {
    background: linear-gradient(45deg, #FF69B4, #FF1493, #FF69B4);
    color: #FFF;
    font-family: "Arial", sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border: 3px solid #FF1493;
    box-shadow: inset 0 0 50px rgba(255, 105, 180, 0.4);
}
body.anime.with-gradient {
    background: linear-gradient(45deg, #FF69B4, #FF1493, #FF69B4, #FF1493);
}

body.firestar {
    background: linear-gradient(45deg, #8B0000, #DC143C, #FF4500);
    color: #FFD700;
    font-family: Georgia, serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 3px solid #FF4500;
    box-shadow: inset 0 0 50px rgba(255, 69, 0, 0.3);
}
body.firestar.with-gradient {
    background: linear-gradient(45deg, #8B0000, #DC143C, #FF4500, #8B0000);
}

body.pride {
    background: linear-gradient(270deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000);
    background-size: 400% 400%;
    animation: rainbow-pulse 10s ease infinite;
    color: white;
    font-family: 'Comic Sans MS', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 3px solid #FFD700;
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.2);
}
body.pride.with-gradient {
    animation-duration: 5s;
}

body.dovewing {
    background: linear-gradient(135deg, #E6FFF2, #BFFFE0, #D0FFFF);
    color: #006633;
    font-style: italic;
    font-family: "Georgia", serif;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    border: 3px solid #66CC99;
    box-shadow: inset 0 0 50px rgba(191, 255, 224, 0.4);
}
body.dovewing.with-gradient {
    background: linear-gradient(135deg, #E6FFF2, #BFFFE0, #D0FFFF, #E6FFF2);
}

body.greystripe {
    background: linear-gradient(45deg, #D3D3D3, #C0C0C0, #FFD700, #A9A9A9);
    color: #2F2F2F;
    font-family: "Arial", sans-serif;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
    border: 3px solid #696969;
    box-shadow: inset 0 0 50px rgba(192, 192, 192, 0.3);
}
body.greystripe.with-gradient {
    background: linear-gradient(45deg, #D3D3D3, #C0C0C0, #FFD700, #A9A9A9, #D3D3D3);
}

body.brambleclaw {
    background: linear-gradient(45deg, #2E1F17, #4A2C1A, #654321);
    color: #FFCC99;
    font-family: "Georgia", serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border: 3px solid #8B4513;
    box-shadow: inset 0 0 50px rgba(255, 204, 153, 0.2);
}
body.brambleclaw.with-gradient {
    background: linear-gradient(45deg, #2E1F17, #4A2C1A, #654321, #2E1F17);
}

body.ashfur {
    color: #9999FF;
    font-family: "Arial", sans-serif;
    text-shadow: 0 0 8px #9999FF;
    border: 3px solid #6666CC;
    box-shadow: inset 0 0 50px rgba(153, 153, 255, 0.2);
    background-color: #111;
    background-image: linear-gradient(45deg, #111, #222, #333);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body.ashfur.with-gradient {
    background-image: linear-gradient(45deg, #111, #222, #333, #111);
}

body.ashfur.with-fire-border::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%; /* Increased height to prevent clipping */
    background-image: url('fire.png');
    background-position: bottom;
    background-size: 100% auto;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
}

/* Settings Menu - Fixed positioning */
body.ashfur #fire-toggle-container {
    display: block;
}

/* Pattern classes with 90s aesthetic */
body.with-patterns {
    background-image:
            radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
            radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
}

body.with-patterns::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
            linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
    background-size: 10px 10px;
    pointer-events: none;
    z-index: -1;
}

/* Legacy pattern class for compatibility */
body.withp {
    background: linear-gradient(to bottom right, #ffb6c1, #ff69b4, #ff1493);
    color: white;
    font-family: "Comic Sans MS", cursive;
    text-shadow: 1px 1px 2px black;
}

/* 90s Chat Room Layout */
.chat-container {
    display: flex;
    height: 100vh;
    padding: 130px 230px 20px 20px; /* Top padding for title, right padding for settings */
    box-sizing: border-box;
}

.chat-sidebar {
    width: 250px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Top bar styling with 90s aesthetic */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 3px solid currentColor;
    background: rgba(0,0,0,0.9);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 999;
    box-sizing: border-box;
}

.left-bar {
    flex-shrink: 0;
    margin-right: 20px;
}

.left-bar button {
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    padding: 8px 15px;
    cursor: pointer;
    font-family: inherit;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 18px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.left-bar button:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.auth-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
}

.auth-buttons a,
.right-controls a {
    color: inherit;
    text-decoration: none;
    padding: 8px 15px;
    border: 2px solid currentColor;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-buttons a:hover,
.right-controls a:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.right-controls {
    flex-shrink: 0;
    margin-left: 20px;
}

.right-controls button {
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    padding: 8px 15px;
    cursor: pointer;
    font-family: inherit;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 18px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.right-controls button:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    transform: scale(1.05);
}

/* Thread list styling with 90s aesthetic */
.thread-list {
    flex: 1;
    padding: 15px;
    border: 2px solid currentColor;
    border-radius: 10px;
    background: rgba(0,0,0,0.8);
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    margin-bottom: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.thread-list h2 {
    color: inherit;
    font-family: inherit;
    text-shadow: inherit;
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.thread-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.thread-list li {
    margin: 8px 0;
}

.thread-link {
    color: inherit;
    text-decoration: none;
    padding: 10px 15px;
    border: 2px solid currentColor;
    display: block;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    text-align: center;
    font-size: 14px;
}

.thread-link:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    transform: scale(1.02);
}

/* Content box styling with 90s aesthetic */
.content-box {
    flex: 1;
    padding: 20px;
    border: 3px solid currentColor;
    border-radius: 10px;
    background: rgba(0,0,0,0.8);
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#thread-title {
    font-weight: bold;
    margin-bottom: 20px;
    color: inherit;
    text-shadow: inherit;
    text-align: center;
    font-size: 18px;
    padding: 10px;
    border-bottom: 2px solid currentColor;
}

#posts {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 20px;
}

#post-form {
    border-top: 2px solid currentColor;
    padding-top: 20px;
    margin-top: auto;
}

#post-form textarea {
    width: 100%;
    height: 80px;
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    font-family: inherit;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    resize: none;
    font-size: 14px;
}

#post-form button {
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 14px;
}

#post-form button:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    transform: scale(1.05);
}

/* Modal styling with 90s aesthetic */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #000;
    color: #00FF00;
    padding: 25px;
    border: 3px solid #00FF00;
    border-radius: 10px;
    min-width: 350px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    text-shadow: 0 0 5px #00FF00;
}

.modal-content h2 {
    color: inherit;
    margin-top: 0;
    text-align: center;
    text-shadow: inherit;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    font-family: inherit;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    box-sizing: border-box;
}

.modal-content button {
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    padding: 12px 20px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    width: 100%;
}

.modal-content button:hover {
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
    transform: scale(1.05);
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: inherit;
    text-shadow: inherit;
    transition: all 0.3s ease;
}

.close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Navigation links with 90s aesthetic */
.bluelinkidfk {
    color: #A6E1FA;
    text-decoration: none;
    margin: 15px;
    display: inline-block;
    padding: 10px 15px;
    border: 2px solid #A6E1FA;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(166, 225, 250, 0.3);
    transition: all 0.3s ease;
}

.bluelinkidfk:hover {
    text-decoration: none;
    background: rgba(166, 225, 250, 0.1);
    box-shadow: 0 0 15px rgba(166, 225, 250, 0.5);
    transform: scale(1.05);
}

/* Post styling */
.post {
    border: 2px solid currentColor;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.post strong {
    color: inherit;
    text-shadow: inherit;
    font-size: 16px;
}

.post em {
    color: inherit;
    opacity: 0.8;
    font-size: 12px;
}

.post p {
    margin: 10px 0 0 0;
    line-height: 1.4;
    font-size: 14px;
}

/* Scrollbar styling for 90s aesthetic */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: currentColor;
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.8);
}

/* Text Readability Options */
body.font-small {
    font-size: 12px;
}

body.font-medium {
    font-size: 14px;
}

body.font-large {
    font-size: 16px;
}

body.font-extra-large {
    font-size: 18px;
}

body.no-text-shadow * {
    text-shadow: none !important;
}

body.high-contrast {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast * {
    color: #fff !important;
    background: #000 !important;
    border-color: #fff !important;
}

body.high-contrast .post {
    background: #111 !important;
    border-color: #fff !important;
}

body.high-contrast .thread-list,
body.high-contrast .content-box {
    background: #111 !important;
    border-color: #fff !important;
}

@keyframes rainbow-pulse {
    0%{background-position:0% 50%}
    50%{background-position:100% 51%}
    100%{background-position:0% 50%}
}
