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

body {
    background-color: #0a120f;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: #b8d8b8;
    padding: 20px 24px 48px 24px;
}

::-webkit-scrollbar {
    width: 8px;
    background: #0f1e18;
}
::-webkit-scrollbar-thumb {
    background: #2a4a3a;
    border-radius: 4px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.header {
    border-bottom: 2px solid #2a4a3a;
    padding-bottom: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.logo h1 {
    font-size: 1.8rem;
    letter-spacing: -1px;
    font-weight: 600;
    color: #8bcb8b;
}

.board-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.board-badge {
    background: #0f1e18;
    border: 1px solid #2a4a3a;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.board-badge:hover {
    background: #1a3a2a;
    border-color: #6faf8f;
}

.board-badge.active {
    background: #2a5a4a;
    border-color: #8bcb8b;
    color: #e0ffe0;
}

.post-form {
    background: #0c1712;
    border: 1px solid #2a4a3a;
    padding: 20px;
    margin-bottom: 32px;
    border-radius: 0px;
}

.reply-form {
    margin-top: 16px;
    margin-bottom: 0;
    background: #0a140f;
    border-left: 3px solid #4a7a5a;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.form-row input, .form-row textarea, .form-row select {
    background: #05100c;
    border: 1px solid #2a5a4a;
    padding: 10px 12px;
    font-family: 'Fira Code', monospace;
    color: #c8e8c8;
    font-size: 0.85rem;
    flex: 1;
}

.form-row textarea {
    min-height: 90px;
    resize: vertical;
    width: 100%;
}

.form-row input:focus, .form-row textarea:focus {
    outline: none;
    border-color: #8bcb8b;
}

.file-input {
    background: #05100c;
    border: 1px solid #2a5a4a;
    padding: 8px 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #b8d8b8;
}

.file-label {
    color: #6f9f7f;
    font-size: 0.8rem;
    padding: 6px 0;
}

button {
    background: #1a3a2a;
    border: 1px solid #4a7a5a;
    padding: 8px 18px;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    color: #e0ffe0;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #2a5a4a;
    border-color: #8bcb8b;
}

.toggle-reply-btn {
    background: #0f1e18;
    border-color: #3a6a4a;
    font-size: 0.8rem;
    padding: 6px 14px;
}

.sage-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.sage-check label {
    font-size: 0.8rem;
}

.thread {
    background: #0c1712;
    border: 1px solid #2a4a3a;
    margin-bottom: 28px;
}


.thread.sticky {
    border-left: 4px solid #cfaf3f;
    border-right: 1px solid #2a4a3a;
}


.thread.locked {
    opacity: 0.85;
}

.thread.locked .post-form,
.thread.locked .submit-reply-btn,
.thread.locked .toggle-reply-btn {
    display: none;
}

.op-post {
    background: #0a140f;
    border-bottom: 1px solid #2a4a3a;
    padding: 18px;
}

.reply-post {
    background: #0c1712;
    border-top: 1px solid #1e3a2a;
    padding: 14px 18px;
    margin-left: 20px;
}

.post-header {
    display: flex;
    gap: 18px;
    font-size: 0.75rem;
    color: #6f9f7f;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.post-number {
    color: #8bcb8b;
    font-weight: bold;
}

.tripcode {
    color: #d0b87a;
}

.sage-badge {
    color: #7f8f7a;
}


.op-badge {
    background: #2a5a4a;
    color: #afffaf;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 8px;
}


.lock-badge {
    background: #4a3a2a;
    color: #cfaf8f;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-left: 8px;
}


.sticky-badge {
    background: #5a4a2a;
    color: #ffdf8f;
    padding: 2px 6px;
    font-size: 0.7rem;
    margin-left: 8px;
}

.post-content {
    font-size: 0.9rem;
    word-break: break-word;
    margin-bottom: 12px;
}

.post-content a.quote-link {
    color: #7fbf7f;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.post-content a.quote-link:hover {
    text-decoration: underline;
    color: #afffaf;
}


.attachments {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.thumb-img {
    max-width: 150px;
    max-height: 150px;
    object-fit: cover;
    border: 1px solid #3a6a4a;
    cursor: pointer;
    background: #00000033;
}

.full-img-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000cc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

.full-img-modal img {
    max-width: 90vw;
    max-height: 90vh;
    border: 2px solid #8bcb8b;
}


.reply-link {
    font-size: 0.7rem;
    margin-top: 6px;
    display: inline-block;
    color: #7faf7f;
    cursor: pointer;
}

.reply-link:hover {
    color: #bfffbf;
}


.op-controls {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.op-btn {
    background: #1a2a22;
    border: 1px solid #4a6a5a;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    color: #8fbf8f;
    cursor: pointer;
}

.op-btn:hover {
    background: #2a4a3a;
    color: #cfffcc;
}

.op-btn.danger {
    border-color: #8a4a4a;
    color: #cf8f8f;
}

.op-btn.danger:hover {
    background: #4a2a2a;
}


.reply-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000cc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.reply-modal-content {
    background: #0c1712;
    border: 2px solid #4a7a5a;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.reply-modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a4a3a;
    font-weight: bold;
    color: #8bcb8b;
}

.reply-modal-close {
    cursor: pointer;
    font-size: 24px;
}

.reply-modal-close:hover {
    color: #afffaf;
}

.board-title {
    font-size: 1.3rem;
    margin: 10px 0 20px 0;
    border-left: 4px solid #6faf8f;
    padding-left: 14px;
}

.footer {
    margin-top: 48px;
    text-align: center;
    font-size: 0.7rem;
    border-top: 1px solid #2a4a3a;
    padding-top: 24px;
    color: #5f8f6f;
}

.thread-reply-form-container {
    transition: all 0.2s ease;
}

.cancel-reply-btn {
    background: #1a2a22;
    border-color: #3a5a4a;
}

.cancel-reply-btn:hover {
    background: #2a3a2a;
}

@media (max-width: 700px) {
    body { padding: 12px; }
    .reply-post { margin-left: 8px; }
    .attachments { gap: 4px; }
    .thumb-img { max-width: 100px; max-height: 100px; }
    .op-controls { gap: 4px; }
    .op-btn { padding: 3px 6px; font-size: 0.65rem; }
}