:root {
--bg: #0d0f13;
--bg-soft: #141922;
--card: #171c25;
--card-2: #1d2430;
--reply: #141922;
--line: rgba(255,255,255,0.09);
--line-strong: rgba(255,255,255,0.16);
--text: #eef2f7;
--muted: #a9b3c2;
--accent: #b22222;
--accent-2: #d13a3a;
--success: #8bcf9b;
--danger: #ff7b7b;
--shadow: 0 18px 42px rgba(0,0,0,0.32);
--container: 980px;
--radius-lg: 20px;
--radius-md: 14px;
--radius-pill: 999px;
}

* {
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

body {
margin: 0;
background:
radial-gradient(circle at top, rgba(178,34,34,0.10), transparent 28%),
linear-gradient(180deg, #0c0f14 0%, #0d1015 100%);
color: var(--text);
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
line-height: 1.5;
}

img {
display: block;
max-width: 100%;
}

button,
input,
textarea,
select {
font: inherit;
}

/* =========================
SHARED NAV
========================= */

.site-nav {
position: sticky;
top: 0;
z-index: 50;
background: rgba(12, 15, 20, 0.92);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--line);
}

.nav-inner {
max-width: 1100px;
margin: auto;
display: flex;
justify-content: space-between;
align-items: center;
gap: 18px;
padding: 14px 20px;
}

.nav-logo {
font-weight: 800;
font-size: 1.1rem;
color: var(--text);
white-space: nowrap;
}

.nav-links {
display: flex;
gap: 20px;
flex-wrap: wrap;
justify-content: flex-end;
}

.nav-links a {
color: #d7dee8;
font-weight: 700;
font-size: .95rem;
text-decoration: none;
transition: opacity .18s ease, color .18s ease;
}

.nav-links a:hover {
opacity: .8;
}

/* =========================
SHARED BUTTONS
========================= */

.home-btn,
.btn {
appearance: none;
border: 1px solid transparent;
border-radius: var(--radius-pill);
padding: 11px 18px;
font-weight: 700;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.home-btn:hover,
.btn:hover {
transform: translateY(-1px);
}

.home-btn-primary,
.btn-primary {
background: linear-gradient(180deg, var(--accent-2), var(--accent));
color: #fff;
}

.home-btn-secondary,
.btn-secondary {
background: transparent;
color: var(--text);
border-color: var(--line-strong);
}

.btn:disabled {
opacity: 0.65;
cursor: not-allowed;
transform: none;
}

/* =========================
HOME PAGE HERO
========================= */

.home-body {
min-height: 100vh;
}

.home-hero {
position: relative;
min-height: 420px;
overflow: hidden;
border-bottom: 1px solid var(--line);
display: flex;
align-items: center;
justify-content: center;
background: #0b0d11;
}

.home-hero-image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center top;
filter: grayscale(100%) brightness(.32);
}

.home-hero-overlay {
position: absolute;
inset: 0;
background:
linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.75) 100%),
linear-gradient(90deg, rgba(178,34,34,0.14), rgba(0,0,0,0.02));
z-index: 1;
}

.home-hero-content {
position: relative;
z-index: 2;
max-width: 900px;
margin: 0 auto;
padding: 56px 20px;
text-align: center;
}

.home-eyebrow {
margin: 0 0 10px;
color: #d7dee8;
font-size: 0.88rem;
letter-spacing: 0.16em;
text-transform: uppercase;
}

.home-hero h1 {
margin: 0;
font-size: clamp(2.4rem, 5vw, 4.4rem);
line-height: 1.02;
color: #f4f7fb;
}

.home-subtitle {
margin: 16px auto 0;
max-width: 760px;
color: #d7dee8;
font-size: clamp(1rem, 2vw, 1.35rem);
line-height: 1.5;
}

/* =========================
HOME PAGE MAIN CONTENT
========================= */

.home-main {
max-width: var(--container);
margin: 0 auto;
padding: 26px 20px 60px;
}

.home-section {
margin-bottom: 22px;
}

.home-card {
background:
linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
var(--card);
border: 1px solid var(--line);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: 24px;
text-align: center;
}

.home-card h2 {
margin: 0 0 12px;
font-size: 1.9rem;
color: #eef2f7;
}

.home-card p {
margin: 0 auto 14px;
max-width: 820px;
color: #d7dee8;
line-height: 1.7;
}

.home-card p:last-child {
margin-bottom: 0;
}

.home-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 18px;
margin-top: 18px;
}

.home-feature {
background: rgba(255,255,255,0.03);
border: 1px solid rgba(255,255,255,0.08);
border-radius: 16px;
padding: 18px;
}

.home-feature h3 {
margin: 0 0 8px;
color: #eef2f7;
font-size: 1.15rem;
}

.home-feature p {
margin: 0;
color: var(--muted);
}

/* =========================
SHARED FORUM BASE
========================= */

.hero {
position: relative;
height: 320px;
overflow: hidden;
border-bottom: 1px solid var(--line);
background: #0b0d11;
}

.hero-image {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center top;
filter: grayscale(100%) contrast(1.06) brightness(0.48);
}

.hero-overlay {
position: absolute;
inset: 0;
background:
linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.70) 100%),
linear-gradient(90deg, rgba(178,34,34,0.18), rgba(0,0,0,0.04));
z-index: 1;
}

.hero-content {
position: relative;
z-index: 2;
max-width: var(--container);
margin: 0 auto;
padding: 42px 20px 30px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: end;
text-align: center;
}

.eyebrow {
margin: 0 0 6px;
color: #c8d0db;
font-size: 0.84rem;
letter-spacing: 0.12em;
text-transform: uppercase;
}

.hero h1 {
margin: 0;
font-size: clamp(2rem, 4vw, 3.25rem);
line-height: 1.05;
}

.hero-text {
margin: 10px auto 0;
max-width: 680px;
color: #d7dde7;
}

.container {
max-width: var(--container);
margin: 0 auto;
padding: 22px 20px 60px;
}

/* =========================
SHARED FORM/UI
========================= */

.compose-bar {
margin-top: -24px;
margin-bottom: 16px;
position: relative;
z-index: 3;
display: flex;
justify-content: center;
}

.card {
background:
linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
var(--card);
border: 1px solid var(--line);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
}

.form-card {
padding: 20px;
margin-bottom: 24px;
}

.is-hidden {
display: none;
}

.section-head {
margin-bottom: 16px;
text-align: center;
}

.section-head h2,
.feed-toolbar h2 {
margin: 0;
font-size: 1.3rem;
}

.section-head p,
.muted {
margin: 6px 0 0;
color: var(--muted);
}

.field {
margin-bottom: 16px;
}

.field label {
display: block;
margin-bottom: 8px;
color: #dfe5ee;
font-weight: 600;
}

.required {
color: #ff9b9b;
}

input[type="text"],
textarea,
select {
width: 100%;
background: var(--bg-soft);
color: var(--text);
border: 1px solid var(--line-strong);
border-radius: var(--radius-md);
padding: 12px 14px;
outline: none;
transition: border-color 0.18s ease, background 0.18s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
border-color: rgba(209,58,58,0.65);
background: #161d27;
}

textarea {
min-height: 160px;
resize: vertical;
}

.char-row {
display: flex;
justify-content: flex-end;
margin-top: 8px;
color: var(--muted);
font-size: 0.92rem;
}

.hp-wrap {
position: absolute !important;
left: -9999px !important;
width: 1px !important;
height: 1px !important;
overflow: hidden !important;
}

.form-actions {
display: flex;
gap: 12px;
align-items: center;
flex-wrap: wrap;
justify-content: center;
}

.form-status {
color: var(--muted);
font-size: 0.95rem;
}

.form-status.notice-success,
.reply-form .form-status.notice-success {
display: inline-block;
padding: 10px 14px;
border-radius: 12px;
background: rgba(139, 207, 155, 0.14);
border: 1px solid rgba(139, 207, 155, 0.35);
color: #d9f2df;
}

.form-status.notice-error,
.reply-form .form-status.notice-error {
display: inline-block;
padding: 10px 14px;
border-radius: 12px;
background: rgba(255, 123, 123, 0.12);
border: 1px solid rgba(255, 123, 123, 0.28);
color: #ffd0d0;
}

/* =========================
SHARED TABS / TABLES / LISTS
========================= */

.feed-toolbar {
margin: 28px 0 14px;
display: flex;
justify-content: space-between;
align-items: end;
gap: 16px;
flex-wrap: wrap;
}

.category-tabs-wrap {
margin-bottom: 18px;
}

.category-tabs {
display: flex;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
}

.tab-btn {
appearance: none;
border: 1px solid var(--line-strong);
background: transparent;
color: var(--text);
border-radius: 999px;
padding: 10px 14px;
cursor: pointer;
font-weight: 700;
}

.tab-btn.active {
background: linear-gradient(180deg, var(--accent-2), var(--accent));
color: #fff;
border-color: transparent;
}

.empty-state {
padding: 26px;
text-align: center;
border: 1px dashed var(--line-strong);
border-radius: 18px;
color: var(--muted);
background: rgba(255,255,255,0.02);
}

/* =========================
SHARED POSTS / REPLIES
========================= */

.posts-wrap {
min-height: 200px;
}

.posts-list {
display: grid;
gap: 16px;
}

.post-card {
background:
linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.01)),
var(--card-2);
border: 1px solid var(--line);
border-radius: 18px;
padding: 16px;
box-shadow: var(--shadow);
}

.post-top {
display: flex;
justify-content: space-between;
gap: 16px;
align-items: start;
margin-bottom: 12px;
}

.post-author {
font-size: 1rem;
font-weight: 800;
color: #f7f9fb;
word-break: break-word;
}

.post-time {
margin-top: 4px;
color: var(--muted);
font-size: 0.9rem;
}

.post-body {
white-space: pre-wrap;
word-wrap: break-word;
color: #edf1f5;
}

.category-badge {
display: inline-block;
border-radius: 999px;
padding: 7px 10px;
font-size: 0.78rem;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.05em;
border: 1px solid transparent;
}

.category-news {
background: rgba(178,34,34,0.18);
color: #ffd2d2;
border-color: rgba(178,34,34,0.45);
}

.category-questions {
background: rgba(59,130,246,0.16);
color: #d7e8ff;
border-color: rgba(59,130,246,0.42);
}

.category-general {
background: rgba(255,255,255,0.08);
color: #f3f5f8;
border-color: rgba(255,255,255,0.12);
}

.post-actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin-top: 14px;
justify-content: center;
}

.link-btn {
appearance: none;
background: transparent;
border: none;
color: #ffb3b3;
cursor: pointer;
padding: 0;
font-weight: 700;
line-height: 1.2;
}

.link-btn:hover {
color: #ffd1d1;
text-decoration: underline;
}

.reply-block {
margin-top: 14px;
padding-top: 14px;
border-top: 1px solid var(--line);
}

.reply-list {
display: grid;
gap: 10px;
margin-top: 14px;
}

.reply-card {
position: relative;
background: var(--reply);
border: 1px solid var(--line);
border-radius: 14px;
padding: 12px;
}

.reply-top {
margin-bottom: 8px;
}

.reply-author {
font-weight: 700;
color: #f3f6fb;
}

.reply-time {
color: var(--muted);
font-size: 0.88rem;
margin-top: 3px;
}

.reply-body {
white-space: pre-wrap;
word-wrap: break-word;
color: #e8edf4;
}

.reply-form {
margin-top: 12px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 14px;
background: rgba(255,255,255,0.02);
}

.reply-form textarea {
min-height: 110px;
}

.pagination {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
margin-top: 24px;
}

.page-btn {
appearance: none;
min-width: 42px;
border: 1px solid var(--line-strong);
background: transparent;
color: var(--text);
border-radius: 12px;
padding: 10px 12px;
cursor: pointer;
font-weight: 700;
}

.page-btn.active {
background: linear-gradient(180deg, var(--accent-2), var(--accent));
border-color: transparent;
color: #fff;
}

/* =========================
SHARED STATES
========================= */

.notice-success {
color: var(--success);
}

.notice-error {
color: var(--danger);
}

/* =========================
MOBILE
========================= */

@media (max-width: 700px) {
.nav-inner {
padding: 12px 14px;
flex-direction: column;
align-items: center;
}

.nav-logo {
text-align: center;
}

.nav-links {
gap: 14px;
justify-content: center;
}

.home-hero {
min-height: 360px;
}

.home-hero-content {
padding: 40px 16px;
}

.home-eyebrow {
font-size: 0.8rem;
letter-spacing: 0.12em;
}

.home-subtitle {
margin-top: 14px;
font-size: 1rem;
}

.home-main {
padding: 16px 14px 42px;
}

.home-card {
padding: 18px;
}

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

.hero {
height: 280px;
}

.hero-content {
padding: 28px 16px 22px;
}

.container {
padding: 16px 14px 42px;
}

.form-card {
padding: 16px;
}

.post-top {
flex-direction: column;
align-items: stretch;
}

.form-actions {
align-items: stretch;
}

.home-btn,
.btn {
width: 100%;
text-align: center;
}

.post-actions {
gap: 14px;
}
}
