/* Forum Styles */
.forum-section {
    padding: 120px 0 60px;
    min-height: 100vh;
}

.forum-header {
    margin-bottom: 32px;
}

.forum-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin: 0 0 8px;
}

.forum-subtitle {
    color: var(--slate-400);
    font-size: 0.95rem;
    margin: 0;
}

.forum-loading,
.forum-empty {
    color: var(--slate-400);
    font-size: 0.9rem;
    padding: 40px 0;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Breadcrumbs */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--slate-400);
}

.forum-breadcrumb a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    text-decoration: underline;
}

/* Categories */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.category-card:hover {
    border-color: var(--accent-indigo);
    background: var(--navy-700);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 4px;
}

.category-info p {
    font-size: 0.85rem;
    color: var(--slate-400);
    margin: 0;
}

.category-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.8rem;
    color: var(--slate-400);
    flex-shrink: 0;
}

/* Threads List */
.threads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.thread-count {
    font-size: 0.85rem;
    color: var(--slate-400);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.threads-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thread-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.thread-row:hover {
    border-color: var(--accent-indigo);
    background: var(--navy-700);
}

.thread-row.pinned {
    border-left: 3px solid var(--accent-cyan);
}

.thread-row.locked {
    opacity: 0.7;
}

.thread-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.thread-info h4 {
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-meta {
    font-size: 0.8rem;
    color: var(--slate-400);
}

.thread-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-pinned {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-cyan);
}

.badge-locked {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.thread-replies {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 60px;
}

.reply-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

.reply-label {
    font-size: 0.7rem;
    color: var(--slate-400);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 14px;
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: 6px;
    color: var(--slate-400);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.page-btn.active,
.page-btn:hover {
    background: var(--accent-indigo);
    color: white;
    border-color: var(--accent-indigo);
}

/* New Thread Form */
.new-thread-form {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.new-thread-form h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 16px;
}

.new-thread-form input,
.new-thread-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--navy-700);
    border: 1px solid var(--navy-600);
    border-radius: 6px;
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.new-thread-form input:focus,
.new-thread-form textarea:focus {
    outline: none;
    border-color: var(--accent-indigo);
}

.form-actions {
    display: flex;
    gap: 8px;
}

/* Thread Detail */
.thread-op {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.thread-op h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 16px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.post-header strong {
    color: var(--white);
    font-size: 0.9rem;
}

.post-date {
    font-size: 0.8rem;
    color: var(--slate-400);
    display: block;
}

.post-body {
    font-size: 0.9rem;
    color: var(--slate-300);
    line-height: 1.6;
}

.post-body a {
    color: var(--accent-cyan);
}

/* Admin Controls */
.admin-controls {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--navy-600);
}

.admin-controls button {
    padding: 6px 14px;
    background: var(--navy-700);
    border: 1px solid var(--navy-600);
    border-radius: 6px;
    color: var(--slate-300);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
}

.admin-controls button:hover {
    border-color: var(--accent-indigo);
    color: var(--white);
}

.admin-controls .btn-danger {
    color: #ef4444;
}

.admin-controls .btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* Replies */
.replies-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.reply-card {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: 8px;
    padding: 20px;
}

.reply-card .post-header {
    position: relative;
}

.reply-delete {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
}

.reply-delete:hover {
    color: #ef4444;
}

/* Reply Form */
.reply-form {
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.reply-form h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 12px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--navy-700);
    border: 1px solid var(--navy-600);
    border-radius: 6px;
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--accent-indigo);
}

/* Locked / Login Messages */
.locked-message,
.login-prompt {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: var(--slate-400);
    background: var(--navy-800);
    border: 1px solid var(--navy-600);
    border-radius: 8px;
}

.login-prompt a {
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .category-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .category-stats {
        flex-direction: row;
        gap: 12px;
    }

    .thread-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .thread-replies {
        flex-direction: row;
        gap: 6px;
    }

    .thread-info h4 {
        white-space: normal;
    }
}
