.forum-page {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 0%, rgba(0, 207, 255, .14), transparent 32rem),
        linear-gradient(180deg, #01050a 0%, #05111d 45%, #01050a 100%);
    color: #e6f4ff;
}

.forum-page *,
.forum-page *::before,
.forum-page *::after {
    box-sizing: border-box;
}

.forum-shell {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 16px 56px;
    color: #e6f4ff;
}

body.forum-page,
body.has-site-chrome.forum-page {
    background:
        radial-gradient(circle at 18% 0%, rgba(0, 207, 255, .14), transparent 32rem),
        linear-gradient(180deg, #01050a 0%, #05111d 45%, #01050a 100%) !important;
    color: #e6f4ff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.forum-page .forum-shell {
    background: transparent !important;
}

/* Hero Section */
.forum-hero {
    padding: 34px 0 28px;
    border-bottom: 1px solid rgba(126, 233, 255, .16);
    margin-bottom: 28px;
}

.forum-hero h1 {
    margin: 0;
    font-family: "Bebas Neue", system-ui, sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: .9;
    letter-spacing: 0;
    color: #ffffff;
}

.forum-hero .excerpt {
    margin: 12px 0 0;
    max-width: 660px;
    color: #d6eaff;
    font-size: 1rem;
    line-height: 1.65;
}

.forum-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #7fe9ff;
    text-decoration: none;
    font-weight: 500;
    transition: color .16s ease;
}

.forum-back:hover {
    color: #fff;
}

/* Filter Tags */
.forum-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(126, 233, 255, .12);
}

.forum-filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(126, 233, 255, .08);
    border: 1px solid rgba(126, 233, 255, .3);
    border-radius: 6px;
    color: #f0fbff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s ease;
}

.forum-filter-tag:hover,
.forum-filter-tag.active {
    background: #00cfff;
    border-color: #00cfff;
    color: #03101a;
}

/* Action Bar */
.forum-actions {
    margin-bottom: 2rem;
}

.forum-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(126, 233, 255, .38);
    border-radius: 6px;
    background: rgba(126, 233, 255, .08);
    color: #f0fbff;
    font: 700 12px/1 "IBM Plex Mono", monospace;
    text-decoration: none;
    cursor: pointer;
    transition: all .16s ease;
}

.forum-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 233, 255, .5);
    background: rgba(126, 233, 255, .15);
}

.forum-btn--primary {
    background: #00cfff;
    border-color: #00cfff;
    color: #03101a;
}

.forum-btn--primary:hover {
    background: #00b8ff;
    border-color: #00b8ff;
}

/* Thread Grid */
.forum-threads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

.forum-thread {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(0, 8, 18, .94);
    border: 1px solid rgba(126, 233, 255, .24);
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
}

.forum-thread:hover {
    background: rgba(0, 8, 18, 1);
    border-color: rgba(126, 233, 255, .4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 207, 255, .15);
}

.forum-thread-category {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(126, 233, 255, .15);
    border: 1px solid rgba(126, 233, 255, .3);
    border-radius: 4px;
    color: #7fe9ff;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.forum-thread-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
}

.forum-thread:hover .forum-thread-title {
    color: #7fe9ff;
}

.forum-thread-preview {
    margin: 0 0 12px;
    color: #bfd8eb;
    font-size: .9rem;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-thread-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(126, 233, 255, .12);
    font-size: .8rem;
    color: #7fe9ff;
}

.forum-thread-author {
    font-weight: 600;
}

.forum-thread-time {
    opacity: .8;
}

.forum-reply-count {
    margin-left: auto;
    background: rgba(0, 207, 255, .15);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Thread Detail Page */
.forum-thread-detail {
    margin: 2rem 0;
}

.forum-op {
    padding: 24px;
    background: rgba(0, 8, 18, .94);
    border: 1px solid rgba(126, 233, 255, .28);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.forum-op-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(126, 233, 255, .12);
    flex-wrap: wrap;
}

.forum-op-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: .9rem;
}

.forum-op-author {
    font-weight: 700;
    color: #00cfff;
}

.forum-op-date {
    color: #7fe9ff;
}

.forum-op-category {
    display: inline-flex;
    padding: 4px 10px;
    background: rgba(0, 207, 255, .15);
    border: 1px solid rgba(126, 233, 255, .3);
    border-radius: 4px;
    color: #7fe9ff;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.forum-op-title {
    margin: 16px 0;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.forum-op-content {
    margin: 16px 0 0;
    color: #d6eaff;
    line-height: 1.75;
    font-size: 1rem;
    word-break: break-word;
    white-space: pre-wrap;
}

.forum-linked-item {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 16px;
    background: rgba(0, 207, 255, .08);
    border: 1px solid rgba(126, 233, 255, .3);
    border-radius: 6px;
    color: #00cfff;
    text-decoration: none;
    font-weight: 600;
    transition: all .16s ease;
}

.forum-linked-item:hover {
    background: rgba(0, 207, 255, .15);
    border-color: rgba(126, 233, 255, .5);
}

/* Replies Section */
.forum-replies-header {
    margin: 2rem 0 1.5rem;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(126, 233, 255, .16);
}

.forum-replies-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #ffffff;
}

.forum-replies-count {
    color: #7fe9ff;
    font-weight: 600;
}

.forum-empty {
    padding: 32px 24px;
    text-align: center;
    background: rgba(0, 8, 18, .94);
    border: 1px dashed rgba(126, 233, 255, .18);
    border-radius: 8px;
    color: #8fa6ba;
}

.forum-reply {
    padding: 20px;
    background: rgba(0, 8, 18, .94);
    border: 1px solid rgba(126, 233, 255, .18);
    border-radius: 8px;
    margin-bottom: 16px;
    transition: all .16s ease;
}

.forum-reply:hover {
    background: rgba(0, 8, 18, 1);
    border-color: rgba(126, 233, 255, .28);
}

.forum-reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: .85rem;
}

.forum-reply-author {
    font-weight: 700;
    color: #7fe9ff;
}

.forum-reply-time {
    color: #8fa6ba;
    margin-left: auto;
}

.forum-reply-content {
    color: #d6eaff;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Reply Form */
.forum-reply-form {
    margin-top: 2rem;
    padding: 24px;
    background: rgba(0, 8, 18, .94);
    border: 1px solid rgba(126, 233, 255, .24);
    border-radius: 8px;
}

.forum-reply-form h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    color: #ffffff;
}

.forum-reply-form-group {
    margin-bottom: 16px;
}

.forum-reply-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 4, 10, .95);
    border: 1px solid rgba(126, 233, 255, .24);
    border-radius: 6px;
    color: #d6eaff;
    font-family: inherit;
    font-size: .95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: all .16s ease;
}

.forum-reply-textarea:focus {
    outline: none;
    border-color: rgba(126, 233, 255, .5);
    background: rgba(0, 4, 10, 1);
    box-shadow: 0 0 12px rgba(0, 207, 255, .12);
}

.forum-reply-textarea::placeholder {
    color: #7fe9ff;
    opacity: .6;
}

.forum-reply-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.forum-login-prompt {
    text-align: center;
    padding: 32px 24px;
    background: rgba(0, 8, 18, .94);
    border: 1px solid rgba(126, 233, 255, .24);
    border-radius: 8px;
    margin-top: 2rem;
}

.forum-login-prompt p {
    margin: 0 0 16px;
    color: #d6eaff;
}

.forum-login-prompt a {
    color: #00cfff;
    text-decoration: none;
    font-weight: 600;
    transition: color .16s ease;
}

.forum-login-prompt a:hover {
    color: #7fe9ff;
}

/* New Thread Form */
.forum-new-thread {
    display: none;
    padding: 24px;
    background: rgba(0, 8, 18, .94);
    border: 1px solid rgba(126, 233, 255, .24);
    border-radius: 8px;
    margin-bottom: 2rem;
}

body.forum-page .forum-thread,
body.forum-page .forum-op,
body.forum-page .forum-reply,
body.forum-page .forum-empty,
body.forum-page .forum-reply-form,
body.forum-page .forum-login-prompt,
body.forum-page .forum-new-thread {
    background: rgba(0, 8, 18, .94) !important;
    color: #e6f4ff;
}

body.forum-page .forum-op-title,
body.forum-page .forum-replies-header h3,
body.forum-page .forum-thread-title,
body.forum-page .forum-new-thread h3,
body.forum-page .forum-reply-form h3 {
    color: #fff;
}

body.forum-page .forum-op-content,
body.forum-page .forum-reply-content,
body.forum-page .forum-thread-preview,
body.forum-page .forum-login-prompt p {
    color: #d6eaff;
}

body.forum-page .forum-back,
body.forum-page .forum-op-date,
body.forum-page .forum-replies-count,
body.forum-page .forum-reply-author,
body.forum-page .forum-thread-meta {
    color: #7fe9ff;
}

.forum-new-thread.active {
    display: block;
}

.forum-new-thread h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    color: #ffffff;
}

.forum-form-group {
    margin-bottom: 16px;
}

.forum-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #7fe9ff;
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.forum-form-input,
.forum-form-textarea,
.forum-form-select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 4, 10, .95);
    border: 1px solid rgba(126, 233, 255, .24);
    border-radius: 6px;
    color: #d6eaff;
    font-family: inherit;
    font-size: .95rem;
    transition: all .16s ease;
}

.forum-form-input:focus,
.forum-form-textarea:focus,
.forum-form-select:focus {
    outline: none;
    border-color: rgba(126, 233, 255, .5);
    background: rgba(0, 4, 10, 1);
    box-shadow: 0 0 12px rgba(0, 207, 255, .12);
}

.forum-form-textarea {
    resize: vertical;
    min-height: 140px;
}

.forum-form-textarea::placeholder,
.forum-form-input::placeholder {
    color: #7fe9ff;
    opacity: .6;
}

/* Responsive */
@media (max-width: 980px) {
    .forum-shell {
        padding-top: 28px;
    }

    .forum-threads {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .forum-op-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .forum-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .forum-hero h1 {
        font-size: 2rem;
    }

    .forum-threads {
        grid-template-columns: 1fr;
    }

    .forum-thread-meta {
        flex-direction: column;
        gap: 8px;
    }

    .forum-reply-count {
        align-self: flex-start;
    }

    .forum-reply-actions {
        flex-direction: column;
    }

    .forum-reply-actions .forum-btn {
        width: 100%;
    }

    .forum-op-title {
        font-size: 1.5rem;
    }
}
