/* 4chan OG Style */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: serif;
    background: linear-gradient(to bottom, #ffddb5 0%, #feffef 300px, #feffef 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #800000;
    font-size: 10pt;
    line-height: 1.4;
}

/* Top Navigation Bar */
.top-nav {
    background: transparent;
    border-bottom: 1px solid #D9BFB7;
    padding: 4px 8px;
    font-size: 9pt;
    text-align: center;
}

.board-links {
    margin-bottom: 4px;
}

.board-links a {
    color: #34345C;
    text-decoration: underline;
    padding: 0 4px;
}

.board-links a:hover {
    color: #D00;
}

.board-separator {
    color: #B7C5D9;
}

/* Header/Logo Section */
.site-header {
    background: transparent;
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #D9BFB7;
}

.site-logo {
    max-width: 300px;
    margin: 0 auto 8px;
}

.board-title {
    font-size: 28pt;
    font-weight: bold;
    color: #AF0A0F;
    margin-bottom: 4px;
}

.board-subtitle {
    font-size: 10pt;
    color: #800000;
}

/* Main Container */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 8px;
    background: transparent;
}

/* Form Section */
.form-section {
    background: transparent;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #D9BFB7;
    text-align: center;
}

.form-section h2 {
    font-size: 12pt;
    font-weight: bold;
    color: #800000;
    margin-bottom: 8px;
}

input[type="text"],
textarea {
    font-family: serif;
    font-size: 10pt;
    padding: 4px;
    border: 1px solid #D9BFB7;
    background: #fff;
    color: #000;
}

input[type="text"]:focus,
textarea:focus {
    outline: 1px solid #34345C;
}

button,
input[type="submit"] {
    font-family: serif;
    font-size: 10pt;
    padding: 4px 12px;
    background: #F0E0D6;
    color: #800000;
    border: 1px solid #D9BFB7;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: #E0D0C6;
}

.sort-btn {
    margin: 0 4px;
}

.sort-btn.active {
    background: #D9BFB7;
    font-weight: bold;
}

/* Thread Posts Grid - 3 columns */
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.media-item {
    background: rgba(240, 224, 214, 0.5);
    border: 1px solid #D9BFB7;
    padding: 8px;
    cursor: pointer;
}

.post-header {
    margin-bottom: 8px;
    font-size: 9pt;
}

.post-info {
    color: #008000;
    font-weight: bold;
}

.post-name {
    color: #008000;
    font-weight: bold;
}

.post-date {
    color: #800000;
}

.post-no {
    color: #800000;
}

.post-no a {
    color: #800000;
    text-decoration: none;
}

.post-no a:hover {
    color: #D00;
    text-decoration: underline;
}

.media-item img {
    width: 100%;
    height: auto;
    border: 1px solid #D9BFB7;
}

.media-item:hover {
    background: #E0D0C6;
}

/* Vote Button */
.thumbs-up-button {
    background: #F0E0D6;
    border: 1px solid #D9BFB7;
    padding: 4px 8px;
    font-size: 10pt;
    color: #800000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.thumbs-up-button:hover {
    background: #E0D0C6;
}

.thumbs-up-button.liked {
    background: #D9BFB7;
    font-weight: bold;
}

.thumbs-up-button .vote-triangle {
    color: #008000;
    font-size: 10pt;
}

.thumbs-up-button .thumbs-count {
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

/* Modal/Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #F0E0D6;
    border: 1px solid #D9BFB7;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
}

.modal-header {
    padding: 8px;
    border-bottom: 1px solid #D9BFB7;
    display: flex;
    justify-content: flex-end;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 18pt;
    color: #800000;
    cursor: pointer;
    padding: 0;
    width: auto;
    height: auto;
}

.modal-close:hover {
    color: #D00;
}

.modal-body {
    padding: 12px;
}

.modal-body img {
    width: 100%;
    height: auto;
    border: 1px solid #D9BFB7;
    margin-bottom: 12px;
}

.modal-prompt {
    font-size: 11pt;
    font-weight: bold;
    margin-bottom: 8px;
    color: #800000;
}

.modal-date {
    font-size: 9pt;
    color: #800000;
    margin-bottom: 12px;
}

.modal-actions {
    padding: 8px;
    border-top: 1px solid #D9BFB7;
    text-align: center;
}

/* Links */
a {
    color: #34345C;
    text-decoration: underline;
}

a:hover {
    color: #D00;
}

/* Start Thread Button */
.start-thread-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #F0E0D6;
    border: 1px solid #D9BFB7;
    color: #800000;
    text-decoration: none;
    font-weight: bold;
    margin: 8px 0;
}

.start-thread-btn:hover {
    background: #E0D0C6;
    text-decoration: none;
}

/* Stats/Info Section */
.stats-section {
    padding: 8px;
    margin-bottom: 12px;
    font-size: 9pt;
    text-align: center;
    color: #800000;
}

.search-box {
    display: inline-block;
    margin: 8px 0;
}

.search-box input {
    font-family: serif;
    font-size: 10pt;
    padding: 4px;
    border: 1px solid #D9BFB7;
    background: #fff;
}

/* Loading/Empty States */
.loading {
    text-align: center;
    padding: 40px;
    color: #800000;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #800000;
}

.empty-state h3 {
    font-size: 14pt;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Alert messages */
.alert {
    padding: 8px;
    margin: 12px 0;
    background: #FFE;
    border: 1px solid #D9BFB7;
    color: #800000;
}

.alert-error {
    background: #FEE;
    border-color: #D99;
}

/* Queue status */
.queue-status {
    background: #FFE;
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #D9BFB7;
    color: #800000;
}

/* Footer */
.footer {
    text-align: center;
    padding: 12px;
    color: #800000;
    font-size: 9pt;
    border-top: 1px solid #D9BFB7;
    margin-top: 20px;
}

/* Load More Button */
#loadMoreBtn {
    grid-column: 1 / -1;
    text-align: center;
    padding: 12px;
}

/* Checkbox (4chan style) */
input[type="checkbox"] {
    margin-right: 4px;
}

/* Quote text (greentext) */
.quote {
    color: #789922;
}

/* Responsive */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .board-title {
        font-size: 20pt;
    }
    
    .top-nav {
        font-size: 8pt;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
}
