body {
    font-family: monospace;
    margin: 0;
    padding: 0;
    background-color: #fef6e4; /* beige */
    color: #001858; /* blue */
}

body.chat-page {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
}

body.chat-page main {
    padding: 0;
    flex: 1;
    min-height: 0;
}

main > header {
    text-align: center;
    margin-bottom: 1em;
}

main > section {
    margin: 1em;
    padding: 14px 20px;
    border: 1px solid #001858;
    border-radius: 5px;
    background-color: #f3d2c1; /* orange */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    width: 80%;
    max-width: 800px;
}

main > div {
    width: 80%;
    max-width: 800px;
}

main > div > article {
    border: 1px solid #001858;
    padding: 14px 20px;
    margin-bottom: 1em;
    background-color: #fef6e4;
    border-radius: 5px;
    box-shadow: inset 0px 8px 16px 0px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

main > div > article:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.15);
}

article > header {
    border-bottom: 1px solid #001858;
    background-color: #001858;
    color: #fef6e4;
    padding: 0.5em;
    margin: -14px -20px 1em -20px;
    border-radius: 5px 5px 0 0;
    box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.2);
}

ul.topnav {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #001858;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 0.7em 1.2em 0 rgba(0,0,0,0.2);
}

ul.topnav li {
    float: left;
}

ul.topnav li a {
    display: block;
    color: #fef6e4;
    text-align: center;
    padding: 1.2em 1.3em;
    text-decoration: none;
    font-family: monospace;
    font-size: 1em;
}

ul.topnav li a:hover:not(.active) {
    background-color: #8bd3dd; /* cyan */
}

ul.topnav li a.active {
    background-color: #f582ae; /* pink */
}

div.topnav {
    height: 3em;
}

div.banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #001858;
    padding: 10px;
    text-align: center;
}

div.banner p {
    color: #fef6e4;
    margin: 0;
}

div.banner a {
    color: #8bd3dd;
}

form {
    display: flex;
    flex-direction: column;
}

input, textarea, select {
    margin: 8px 0;
    padding: 14px 20px;
    border: 1px solid #001858;
    border-radius: 4px;
    background-color: #fef6e4;
    color: #001858;
    font-family: monospace;
    box-sizing: border-box;
    box-shadow: inset 0px 8px 16px 0px rgba(0,0,0,0.2);
}

input[type="submit"] {
    background-color: #001858;
    color: #fef6e4;
    border: none;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #8bd3dd;
}

button {
    margin: 8px 0;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    background-color: #001858;
    color: #fef6e4;
    cursor: pointer;
    font-family: monospace;
    width: 100%;
}

button:hover {
    background-color: #8bd3dd;
}

img {
    max-width: 100%;
    object-fit: contain;
}

h1, h2, h3, h4, h5, h6 {
    font-family: monospace;
    color: #001858;
}

p, a, li {
    font-family: monospace;
    color: #001858;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Styles for board lists */
ul.board-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

li.board-item {
    margin-bottom: 1em;
    padding: 1.2em 1.5em;
    background-color: #fef6e4;
    border: 1px solid #001858;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

li.board-item:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 14px 0px rgba(0,0,0,0.15);
}

li.board-item a {
    color: #001858;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.4em;
}

li.board-item a:hover {
    color: #f582ae;
    text-decoration: underline;
}

p.board-desc {
    margin: 0.5em 0 0 0;
    color: #001858;
    font-size: 1em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Styles for thread lists */
ul.thread-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

li.thread-item {
    margin-bottom: 1em;
    padding: 1.2em 1.5em;
    background-color: #fef6e4;
    border: 1px solid #001858;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

li.thread-item:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 14px 0px rgba(0,0,0,0.15);
}

li.thread-item a {
    color: #001858;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.4em;
}

li.thread-item a:hover {
    color: #f582ae;
    text-decoration: underline;
}

p.thread-info {
    margin: 0.5em 0 0 0;
    color: #001858;
    font-size: 1em;
}


/* Specific styles for individual thread posts */
.thread-posts {
    width: 80%;
    max-width: 800px;
}

.post-item {
    background-color: #fef6e4;
    border: 1px solid #001858;
    border-radius: 8px;
    margin-bottom: 1.5em;
    padding: 1.2em 1.5em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 14px 0px rgba(0,0,0,0.15);
}

.post-item header {
    background-color: #001858;
    color: #fef6e4;
    padding: 0.5em;
    margin: -1.2em -1.5em 1em -1.5em;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #001858;
}

.post-item header h3 {
    margin: 0;
    font-size: 1.2em;
}

.post-item header p {
    margin: 0.3em 0 0 0;
    font-size: 0.95em;
    opacity: 0.9;
}

.post-content {
    margin: 0;
    padding: 0.8em;
    line-height: 1.5;
    font-size: 1em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-actions {
    margin-top: 0.8em;
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex-wrap: wrap;
}

.post-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.4em 0.8em;
    border: 1px solid #001858;
    border-radius: 4px;
    background-color: #fef6e4;
    color: #001858;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.9em;
    margin: 0;
    width: auto;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.post-action-btn:hover {
    background-color: #8bd3dd;
    transform: translateY(-1px);
}

.post-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.post-action-btn.like-btn.active {
    background-color: #8bd3dd;
    border-color: #001858;
    font-weight: bold;
}

.post-action-btn.dislike-btn.active {
    background-color: #f582ae;
    border-color: #001858;
    color: #fef6e4;
    font-weight: bold;
}

.like-count-display, .dislike-count-display {
    font-size: 0.9em;
    color: #001858;
    opacity: 0.8;
}

.post-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-id {
    opacity: 0.6;
    font-size: 0.85em;
}

.post-reply-link a {
    color: #8bd3dd;
    text-decoration: underline;
}

.post-reply-link a:hover {
    color: #f582ae;
}

.post-reply {
    margin-left: 20px;
    border-left: 3px solid #8bd3dd;
}

.post-highlighted {
    animation: post-highlight-fade 2s ease-out;
}

@keyframes post-highlight-fade {
    0% { box-shadow: 0 0 0 3px #f582ae; }
    100% { box-shadow: none; }
}

#reply-section .reply-indicator {
    background-color: #001858;
    color: #fef6e4;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: none;
    align-items: center;
    justify-content: space-between;
}

#reply-section .reply-indicator span {
    font-size: 0.9em;
    color: #fef6e4;
}

#reply-section .reply-indicator button {
    background: none;
    border: none;
    color: #fef6e4;
    cursor: pointer;
    font-size: 1em;
    padding: 0 6px;
    margin: 0;
    width: auto;
}

#reply-section .reply-indicator button:hover {
    background: none;
    color: #f582ae;
}

/* New style for highlighted chat messages */
.chat-message-highlighted {
    border: 2px solid #f582ae; /* Pink border */
    background-color: #ffe0f0; /* Light pink background */
    animation: highlight-fade 2s ease-out;
}

/* Chat page styles */
.chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    background-color: #fef6e4;
    box-shadow: none;
    overflow: hidden;
}

.chat-header {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #001858;
    position: relative;
    flex-shrink: 0;
}

.connection-status {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    padding: 4px 10px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.1);
}

.connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.connection-dot.connected {
    background-color: #4ade80;
}

.connection-dot.connecting {
    background-color: #fbbf24;
}

.connection-dot.disconnected {
    background-color: #f87171;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.typing-indicator {
    padding: 8px 12px;
    background-color: #f3d2c1;
    border-radius: 5px;
    font-size: 0.85em;
    font-style: italic;
    color: #001858;
    margin-bottom: 8px;
    display: none;
}

.typing-indicator.visible {
    display: block;
}

.typing-dots {
    display: inline-block;
    margin-left: 4px;
}

.typing-dots span {
    animation: typing-blink 1.4s infinite;
    display: inline-block;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-blink {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.jump-to-bottom {
    position: absolute;
    bottom: 70px;
    right: 20px;
    background-color: #001858;
    color: #fef6e4;
    border: 2px solid #001858;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
    z-index: 100;
}

.jump-to-bottom.visible {
    display: flex;
}

.jump-to-bottom:hover {
    transform: translateY(2px);
    background-color: #8bd3dd;
}

.jump-to-bottom .unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #f582ae;
    color: #fef6e4;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: bold;
}

.message-status {
    font-size: 0.7em;
    color: #666;
    margin-left: 8px;
}

.message-status.sending {
    color: #fbbf24;
}

.message-status.sent {
    color: #4ade80;
}

.message-status.failed {
    color: #f87171;
    cursor: pointer;
}

.chat-breadcrumb {
    background-color: #f3d2c1;
    padding: 8px 12px;
    border-bottom: 1px solid #001858;
    font-size: 0.85em;
    text-align: left;
    flex-shrink: 0;
}

.chat-breadcrumb a {
    color: #001858;
    text-decoration: none;
}

.chat-breadcrumb a:hover {
    color: #f582ae;
    text-decoration: underline;
}

.chat-breadcrumb-separator {
    margin: 0 6px;
    opacity: 0.6;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 8px;
    max-width: 90%;
    position: relative;
}

.chat-message .post-actions {
    position: absolute;
    top: -12px;
    right: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    background-color: #fef6e4;
    border: 1px solid #001858;
    border-radius: 4px;
    padding: 2px 4px;
    z-index: 10;
    transition: opacity 0.15s ease;
}

.chat-message:hover .post-actions {
    opacity: 1;
    pointer-events: auto;
}

.chat-message-header {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.chat-message-pfp {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
}

.chat-message-username {
    font-weight: bold;
    color: #001858;
    font-size: 0.9em;
}

.chat-message-timestamp {
    font-size: 0.7em;
    color: #666;
    margin-left: 8px;
}

.chat-message-content {
    background-color: #f3d2c1;
    padding: 6px 10px;
    border-radius: 5px;
    line-height: 1.3;
    font-size: 0.9em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chat-message-reply {
    background-color: rgba(0,0,0,0.1);
    padding: 4px 8px;
    border-radius: 5px;
    margin-bottom: 3px;
    font-size: 0.8em;
    cursor: pointer;
}

.chat-message-mention {
    color: #f582ae;
    font-weight: bold;
}

.chat-input {
    padding: 8px;
    border-top: 1px solid #001858;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-input textarea {
    resize: none;
    height: 50px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.chat-input button {
    align-self: flex-end;
    width: auto;
    padding: 6px 12px;
    font-size: 0.9em;
}

.chat-message .post-actions a {
    color: #001858;
    text-decoration: none;
    font-size: 0.8em;
    padding: 2px 5px;
    border: none;
    border-radius: 3px;
}

.chat-message .post-actions a:hover {
    background-color: #8bd3dd;
    color: #fef6e4;
}

.autocomplete-popup {
    position: absolute;
    background-color: #fff;
    border: 1px solid #001858;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9em;
}

.autocomplete-item:hover {
    background-color: #f3d2c1;
}

.reply-indicator {
    background-color: #001858;
    color: #fef6e4;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    display: none;
    align-items: center;
    justify-content: space-between;
}

.reply-indicator span {
    font-size: 0.9em;
}

.reply-indicator button {
    background: none;
    border: none;
    color: #fef6e4;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0 5px;
    margin: 0;
    width: auto;
}

.reply-indicator button:hover {
    background: none;
    color: #f582ae;
}
/* Grouped messages (hide header for consecutive messages from same user) */
.chat-message.grouped {
    margin-top: -4px;
}
.chat-message.grouped .chat-message-header {
    display: none;
}
@keyframes highlight-fade {
    from {
        background-color: #f582ae;
        border-color: #f582ae;
    }
    to {
        background-color: #ffe0f0;
        border-color: #f582ae;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #333;
        color: #fef6e4;
    }
    main > section {
        background-color: #555;
        border-color: #fef6e4;
    }
    main > div > article {
        background-color: #444;
        border-color: #fef6e4;
    }
    article > header {
        background-color: #222;
        border-color: #fef6e4;
    }
    input, textarea, select {
        background-color: #444;
        color: #fef6e4;
        border-color: #fef6e4;
    }
    input[type="submit"], button {
        background-color: #fef6e4;
        color: #001858;
    }
    input[type="submit"]:hover, button:hover {
        background-color: #8bd3dd;
    }
    li.board-item, li.thread-item {
        background-color: #444;
        border-color: #fef6e4;
    }
    li.board-item a, li.thread-item a {
        color: #fef6e4;
    }
    li.board-item a:hover, li.thread-item a:hover {
        color: #f582ae;
    }
    p.board-desc, p.thread-info {
        color: #fef6e4;
    }
    .post-item {
        background-color: #444;
        border-color: #fef6e4;
    }
    .post-content {
        color: #fef6e4;
    }
    .post-action-btn {
        background-color: #555;
        color: #fef6e4;
        border-color: #fef6e4;
    }
    .post-action-btn:hover {
        background-color: #8bd3dd;
        color: #001858;
    }
    .post-action-btn.like-btn.active {
        background-color: #8bd3dd;
        color: #001858;
    }
    .post-action-btn.dislike-btn.active {
        background-color: #f582ae;
        color: #001858;
    }
    .like-count-display, .dislike-count-display {
        color: #fef6e4;
    }
    .post-reply {
        border-left-color: #8bd3dd;
    }
    .post-reply-link a {
        color: #8bd3dd;
    }
    .post-id {
        color: #fef6e4;
    }
    #reply-section .reply-indicator {
        background-color: #222;
    }
    h1, h2, h3, h4, h5, h6 {
        color: #fef6e4;
    }
    p, a, li {
        color: #fef6e4;
    }
    /* Dark mode highlight */
    .chat-message-highlighted {
        border: 2px solid #f582ae; /* Pink border */
        background-color: #6a0e3f; /* Darker pink background */
        animation: highlight-fade-dark 2s ease-out;
    }
    @keyframes highlight-fade-dark {
        from {
            background-color: #f582ae;
            border-color: #f582ae;
        }
        to {
            background-color: #6a0e3f;
            border-color: #f582ae;
        }
    }

    body.chat-page {
        background-color: #333;
    }

    .chat-container {
        background-color: #444;
    }

    .chat-breadcrumb {
        background-color: #555;
    }

    .chat-breadcrumb a {
        color: #fef6e4;
    }

    .typing-indicator {
        background-color: #555;
        color: #fef6e4;
    }

    .jump-to-bottom {
        background-color: #fef6e4;
        color: #001858;
        border-color: #fef6e4;
    }

    .jump-to-bottom:hover {
        background-color: #8bd3dd;
    }

    .chat-header {
        border-color: #fef6e4;
    }

    .chat-message-username {
        color: #fef6e4;
    }

    .chat-message-timestamp {
        color: #aaa;
    }

    .chat-message-content {
        background-color: #555;
    }

    .chat-input {
        border-color: #fef6e4;
    }

    .autocomplete-popup {
        background-color: #444;
        border-color: #fef6e4;
        color: #fef6e4;
    }

    .autocomplete-item:hover {
        background-color: #555;
    }

    .chat-message .post-actions {
        background-color: #444;
        border-color: #fef6e4;
    }

    .chat-message .post-actions a {
        color: #fef6e4;
    }

    .chat-message .post-actions a:hover {
        background-color: #8bd3dd;
        color: #001858;
    }

    .reply-indicator {
        background-color: #222;
        color: #fef6e4;
    }

    .reply-indicator button {
        color: #fef6e4;
    }

    .reply-indicator button:hover {
        color: #f582ae;
    }
}

/* Breadcrumb navigation */
.breadcrumb {
    padding: 8px 0;
    margin-bottom: 1em;
    font-size: 0.95em;
}

.breadcrumb a {
    color: #001858;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #f582ae;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #001858;
    opacity: 0.6;
}

.breadcrumb-current {
    color: #001858;
    opacity: 0.7;
}

/* Back button */
.back-button {
    display: inline-block;
    padding: 8px 16px;
    margin-bottom: 1em;
    background-color: #f3d2c1;
    color: #001858;
    text-decoration: none;
    border: 1px solid #001858;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.back-button:hover {
    background-color: #8bd3dd;
    transform: translateY(-2px);
    box-shadow: 0px 4px 8px rgba(0,0,0,0.15);
}

.back-button::before {
    content: "← ";
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid #fef6e4;
    border-top: 3px solid #001858;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {
    .breadcrumb a {
        color: #fef6e4;
    }
    
    .breadcrumb-separator {
        color: #fef6e4;
    }
    
    .breadcrumb-current {
        color: #fef6e4;
    }
    
    .back-button {
        background-color: #555;
        color: #fef6e4;
        border-color: #fef6e4;
    }
    
    .back-button:hover {
        background-color: #8bd3dd;
        color: #001858;
    }
}

/* Loading state for buttons */
button:disabled, input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button.loading, input[type="submit"].loading {
    position: relative;
    color: transparent;
}

button.loading::after, input[type="submit"].loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 3px solid #fef6e4;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success/error message notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 5px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.3);
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
    font-family: monospace;
}

.notification.success {
    background-color: #8bd3dd;
    color: #001858;
    border: 1px solid #001858;
}

.notification.error {
    background-color: #f582ae;
    color: #fef6e4;
    border: 1px solid #001858;
}

.notification.info {
    background-color: #f3d2c1;
    color: #001858;
    border: 1px solid #001858;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.hiding {
    animation: slideOut 0.3s ease-out forwards;
}

/* Form validation styles */
input.error, textarea.error, select.error {
    border-color: #f582ae;
    border-width: 2px;
}

.field-error {
    color: #f582ae;
    font-size: 0.9em;
    margin-top: 4px;
    margin-bottom: 8px;
    display: block;
}

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 0.85em;
    color: #001858;
    opacity: 0.7;
    margin-top: 4px;
}

.char-counter.warning {
    color: #f582ae;
    font-weight: bold;
}

/* Draft indicator styles */
.draft-indicator {
    background-color: #f3d2c1;
    border: 1px solid #001858;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    animation: slideInFromTop 0.3s ease-out;
}

.draft-indicator-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
}

.draft-indicator-icon {
    font-size: 1.2em;
}

.draft-indicator-text {
    flex: 1;
    color: #001858;
    font-size: 0.9em;
}

.draft-indicator-button {
    padding: 5px 12px;
    border: 1px solid #001858;
    background-color: #fef6e4;
    color: #001858;
    border-radius: 3px;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.85em;
}

.draft-indicator-button:hover {
    background-color: #001858;
    color: #fef6e4;
}

.draft-indicator-button.restore {
    background-color: #8bd3dd;
    border-color: #001858;
}

.draft-indicator-button.restore:hover {
    background-color: #001858;
    color: #8bd3dd;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (prefers-color-scheme: dark) {
    .spinner {
        border-color: #444;
        border-top-color: #fef6e4;
    }
    
    button.loading::after, input[type="submit"].loading::after {
        border-color: #001858;
        border-top-color: transparent;
    }
    
    .notification.success {
        background-color: #8bd3dd;
        color: #001858;
    }
    
    .notification.error {
        background-color: #f582ae;
        color: #001858;
    }
    
    .notification.info {
        background-color: #555;
        color: #fef6e4;
    }
    
    input.error, textarea.error, select.error {
        border-color: #f582ae;
    }
    
    .field-error {
        color: #f582ae;
    }
    
    .char-counter {
        color: #fef6e4;
    }
    
    .draft-indicator {
        background-color: #2a2a2a;
        border-color: #fef6e4;
    }
    
    .draft-indicator-text {
        color: #fef6e4;
    }
    
    .draft-indicator-button {
        background-color: #1a1a1a;
        color: #fef6e4;
        border-color: #fef6e4;
    }
    
    .draft-indicator-button:hover {
        background-color: #fef6e4;
        color: #1a1a1a;
    }
    
    .draft-indicator-button.restore {
        background-color: #8bd3dd;
        color: #001858;
        border-color: #8bd3dd;
    }
    
    .draft-indicator-button.restore:hover {
        background-color: #fef6e4;
        color: #001858;
    }
}

@media (max-width: 600px) {
    ul.topnav li {
        float: none;
        width: 100%;
    }
    main {
        padding: 10px;
    }
    main > section {
        margin: 0.5em;
        padding: 0.5em;
        width: 95%;
    }
    main > div {
        width: 95%;
    }
    .thread-posts {
        width: 95%;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
