/* ═══════════════════════════════════════════════════
   board.css — Cursed Boards
   Fits the site's dark purple/crimson theme
   while keeping the 4chan-style imageboard layout
═══════════════════════════════════════════════════ */

/* ── Index page ── */
.boards-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.boards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    padding: 20px 28px;
    background: rgba(139,0,0,0.08);
    border: 1px solid var(--blood-red);
    border-radius: 8px;
}

.boards-title {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--crimson);
    text-shadow: 0 0 12px rgba(220,20,60,0.4);
    letter-spacing: 2px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.boards-title img {
	width: 128px;
	height: 128px;
	object-fit: contain;
	flex-shrink: 0;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.board-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--blood-red);
    border-radius: 6px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.board-card:hover {
    border-color: var(--crimson);
    border-left-color: var(--crimson);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139,0,0,0.25);
}

.board-code {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--crimson);
    margin-bottom: 6px;
}

.board-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.board-description {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
    line-height: 1.5;
}

.board-stats {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.request-board-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--blood-red);
    border-radius: 6px;
    padding: 28px;
    text-align: center;
}

.request-board-section h3 {
    font-family: 'Courier New', monospace;
    color: var(--crimson);
    margin-bottom: 10px;
    font-size: 18px;
    letter-spacing: 1px;
}

/* ── Board page (thread list) ── */
.board-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.board-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px 24px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--blood-red);
    border-radius: 6px;
    gap: 16px;
    flex-wrap: wrap;
}

.board-page-title {
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 700;
    color: var(--crimson);
    margin: 0;
}

.board-page-title span {
    color: #888;
    font-size: 14px;
    font-weight: 400;
    margin-left: 10px;
}

.btn-new-thread {
    padding: 9px 20px;
    background: var(--blood-red);
    color: #fff;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.btn-new-thread:hover {
    background: var(--crimson);
    box-shadow: 0 4px 14px rgba(139,0,0,0.4);
}

/* Thread rows — compact imageboard style */
.thread-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
}

.thread-row:hover {
    border-color: rgba(139,0,0,0.5);
}

.thread-row-pin {
    border-left: 3px solid var(--crimson);
}

.thread-row-content {
    flex: 1;
    min-width: 0;
}

.thread-row-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-row-title a {
    color: var(--text-color);
    text-decoration: none;
}

.thread-row-title a:hover {
    color: var(--crimson);
}

.thread-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: #666;
    align-items: center;
}

.thread-row-meta a {
    color: #888;
    text-decoration: none;
}

.thread-row-meta a:hover {
    color: var(--crimson);
}

.thread-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-pinned {
    font-size: 10px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    color: var(--crimson);
    background: rgba(139,0,0,0.15);
    border: 1px solid rgba(139,0,0,0.3);
    border-radius: 3px;
    padding: 1px 6px;
    text-transform: uppercase;
}

/* ── Thread view ── */
.thread-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.thread-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px 22px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--blood-red);
    border-radius: 6px;
}

.thread-page-title {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

.btn-board-back {
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(139,0,0,0.08);
    color: var(--crimson);
    border: 1px solid rgba(139,0,0,0.3);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-board-back:hover {
    background: rgba(139,0,0,0.18);
}

/* Post blocks (OP + replies) */
.post-block {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.post-block-op {
    border-top: 3px solid var(--blood-red);
}

.post-block-reply {
    margin-left: 32px;
    border-top: 2px solid rgba(139,0,0,0.3);
}

.post-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(139,0,0,0.06);
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}

.post-block-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-block-author strong {
    font-family: 'Courier New', monospace;
    color: var(--crimson);
    font-size: 13px;
}

.post-block-label {
    font-size: 11px;
    color: #555;
    font-style: italic;
}

.post-block-date {
    font-size: 12px;
    color: #555;
    font-family: 'Courier New', monospace;
}

.post-block-body {
    padding: 16px;
}

.post-block-image {
    margin-bottom: 14px;
}

.post-block-image img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: block;
}

.post-block-content {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-color);
    word-break: break-word;
}

/* Reply form */
.reply-form-box {
    margin-top: 24px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
}

.reply-form-box h3 {
    font-family: 'Courier New', monospace;
    color: var(--crimson);
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

/* ── Create thread form ── */
.create-thread-container {
    max-width: 680px;
    margin: 50px auto;
    padding: 0 20px;
}

.create-thread-form {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--blood-red);
    border-radius: 6px;
    padding: 32px;
}

.create-thread-title {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    color: var(--crimson);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

/* ── Shared utils ── */
.boards-empty {
    text-align: center;
    padding: 70px 20px;
    color: #666;
}

.boards-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

@media (max-width: 640px) {
    .board-page-header,
    .thread-page-header {
        flex-direction: column;
        gap: 12px;
    }

    .thread-page-title {
        font-size: 17px;
    }

    .post-block-reply {
        margin-left: 12px;
    }

    .post-block-image img {
        max-width: 100%;
    }

    .boards-grid {
        grid-template-columns: 1fr;
    }
}
