:root {
  --bg: #08100b;
  --bg-deep: #050a07;
  --surface: rgba(12, 18, 14, 0.92);
  --surface-soft: rgba(18, 26, 21, 0.94);
  --line: rgba(133, 190, 112, 0.14);
  --line-strong: rgba(133, 190, 112, 0.22);
  --text: #eef5ef;
  --muted: #a9b7ad;
  --primary: #79c35a;
  --primary-strong: #5f9d49;
  --danger: #ff7a84;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
  --radius-xl: 1.4rem;
  --radius-lg: 1.05rem;
  --radius-md: 0.9rem;
  --content-width: min(1180px, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(121, 195, 90, 0.14), transparent 24%),
    radial-gradient(circle at 86% 14%, rgba(93, 132, 186, 0.1), transparent 20%),
    linear-gradient(180deg, #07100b 0%, #08110c 45%, #050906 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  position: relative;
  overflow: hidden;
}

.ambient {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(96px);
  pointer-events: none;
  opacity: 0.22;
  z-index: 0;
}

.ambient-a {
  top: -11rem;
  right: -8rem;
  background: rgba(121, 195, 90, 0.28);
}

.ambient-b {
  bottom: -14rem;
  left: -11rem;
  background: rgba(74, 109, 175, 0.18);
}

.topbar,
.page-wrap,
.site-footer {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0.9rem;
  width: var(--content-width);
  margin: 1rem auto 0;
  padding: 0.95rem 1rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(10, 15, 12, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.88rem;
}

.brand-mark,
.avatar-pill,
.partner-icon {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.95rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #08110b;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
}

.brand-mark {
  overflow: hidden;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.main-nav a {
  padding: 0.68rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  transition: 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  border-color: rgba(121, 195, 90, 0.16);
  background: rgba(121, 195, 90, 0.08);
}

.page-wrap {
  width: var(--content-width);
  margin: 1.4rem auto 2.4rem;
  display: grid;
  gap: 1.2rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.glow-panel::after,
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(121, 195, 90, 0.12), transparent 50%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.glow-panel:hover::after,
.hero-panel:hover::after {
  opacity: 1;
}

.hero-panel,
.inner-hero,
.article-panel,
.auth-shell,
.editor-panel,
.support-info,
.empty-state,
.content-panel {
  padding: clamp(1.2rem, 2vw, 1.8rem);
}

.hero-panel {
  min-height: 30rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
  align-items: center;
  background:
    linear-gradient(145deg, rgba(121, 195, 90, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(12, 18, 14, 0.96), rgba(10, 15, 12, 0.9));
}

.inner-hero {
  background:
    linear-gradient(145deg, rgba(121, 195, 90, 0.05), transparent 40%),
    linear-gradient(180deg, rgba(12, 18, 14, 0.94), rgba(10, 15, 12, 0.9));
}

.hero-copy,
.card-copy,
.thread-copy,
.editor-box {
  display: grid;
  gap: 0.75rem;
}

.hero-copy h1,
.inner-hero h1,
.auth-shell h1,
.article-panel h1,
.editor-panel h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 0.98;
  font-weight: 800;
}

.hero-text,
.lead {
  color: #dce8df;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 38rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions,
.badge-row,
.chip-row,
.social-mini,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #08110b;
  background: linear-gradient(145deg, var(--primary), #4f8d59);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.badge,
.chip,
.partner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.46rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(121, 195, 90, 0.14);
  background: rgba(121, 195, 90, 0.06);
  color: var(--text);
  font-size: 0.85rem;
}

.hero-visual {
  position: relative;
  min-height: 24rem;
  display: grid;
  place-items: center;
}

.parallax-stack {
  position: relative;
  width: min(100%, 28rem);
  height: 25rem;
}

.hero-photo-shell {
  position: absolute;
  inset: 1.25rem 1.35rem 1.5rem 1.25rem;
  padding: 0.7rem;
  border-radius: 1.3rem;
  border: 1px solid rgba(121, 195, 90, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.hero-profile {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.parallax-card {
  position: absolute;
  border-radius: 1.1rem;
  border: 1px solid rgba(121, 195, 90, 0.12);
  background: rgba(16, 23, 18, 0.9);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

.parallax-card span,
.parallax-card strong {
  display: block;
}

.parallax-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.parallax-card strong {
  margin-top: 0.2rem;
}

.parallax-deep {
  inset: 0 2rem 2rem 0;
  background:
    linear-gradient(135deg, rgba(121, 195, 90, 0.12), rgba(121, 195, 90, 0.03)),
    rgba(16, 23, 18, 0.5);
}

.parallax-mid,
.parallax-top {
  padding: 1rem;
}

.parallax-mid {
  top: 2.2rem;
  left: 0.4rem;
  width: 12.5rem;
}

.parallax-top {
  right: 0;
  bottom: 2.4rem;
  width: 14rem;
}

.hero-glow {
  position: absolute;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(121, 195, 90, 0.22), transparent 68%);
  filter: blur(32px);
}

.info-grid,
.card-grid,
.split-grid,
.footer-grid,
.field-row,
.link-grid,
.stat-list,
.category-list,
.thread-list,
.reply-list,
.admin-list,
.overview-grid {
  display: grid;
  gap: 1rem;
}

.info-grid,
.split-grid,
.footer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-grid.single {
  grid-template-columns: 1fr;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-grid,
.stat-list,
.overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.news-card,
.partner-card,
.support-info,
.editor-panel {
  padding: 1.15rem;
}

.social-shell {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.social-card,
.thread-card,
.category-card,
.reply-card,
.admin-row,
.inset-panel,
.overview-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(121, 195, 90, 0.1);
  background: var(--surface-soft);
}

.social-card {
  display: grid;
  gap: 0.35rem;
}

.social-card.highlight {
  background:
    linear-gradient(145deg, rgba(121, 195, 90, 0.12), rgba(79, 141, 89, 0.06)),
    var(--surface-soft);
}

.overview-card strong,
.social-card strong,
.category-card strong,
.thread-card strong,
.reply-card strong,
.admin-row strong,
.news-card h2,
.news-card h3,
.partner-card h2 {
  display: block;
}

.stat-list div {
  padding: 0.95rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(121, 195, 90, 0.08);
}

.stat-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.section-header.simple {
  margin-bottom: 0.95rem;
}

.section-header.simple .eyebrow,
.section-header .eyebrow {
  margin-bottom: 0.35rem;
}

.section-header h2,
.panel h2,
.panel h3 {
  margin: 0;
}

.news-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.2rem;
}

.news-cover,
.article-cover,
.editor-image-preview {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(121, 195, 90, 0.1);
}

.news-cover {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 0.9rem;
}

.article-cover {
  margin: 1rem 0 1.2rem;
}

.text-link,
.social-mini a {
  color: #d4e8ca;
  font-weight: 700;
}

.thread-card,
.category-card,
.admin-row {
  display: grid;
  gap: 0.75rem;
}

.thread-card {
  grid-template-columns: auto 1fr auto;
  align-items: start;
}

.thread-card.compact {
  grid-template-columns: 1fr auto;
}

.thread-meta {
  color: var(--muted);
  text-align: right;
  display: grid;
  gap: 0.2rem;
}

.thread-list {
  align-content: start;
}

.forum-body,
.article-body {
  color: #e8f0e9;
  line-height: 1.75;
}

.article-body h2,
.article-body h3 {
  margin-top: 1.4rem;
}

.article-body a {
  color: #d4e8ca;
}

.reply-card {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.support-form,
.stack-form,
.news-form {
  display: grid;
  gap: 0.9rem;
}

label,
.checkbox-row {
  display: grid;
  gap: 0.45rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.88rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(121, 195, 90, 0.12);
  background: rgba(8, 12, 9, 0.96);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(121, 195, 90, 0.22);
  border-color: var(--line-strong);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-row input {
  width: auto;
}

.auth-shell {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 1.15rem;
}

.site-footer {
  width: var(--content-width);
  margin: 0 auto 2rem;
  padding: 1.4rem;
}

.flash {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid;
}

.flash.success {
  border-color: rgba(121, 195, 90, 0.22);
  background: rgba(121, 195, 90, 0.08);
}

.flash.error {
  border-color: rgba(255, 122, 132, 0.24);
  background: rgba(255, 122, 132, 0.08);
}

.admin-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.admin-row.stacked {
  grid-template-columns: 1fr;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.editor-toolbar button {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(121, 195, 90, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.editor-surface {
  min-height: 18rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(121, 195, 90, 0.12);
  background: rgba(7, 10, 8, 0.96);
}

.editor-surface:focus {
  outline: 2px solid rgba(121, 195, 90, 0.22);
}

.empty-state {
  text-align: center;
}

@media (max-width: 980px) {
  .hero-panel,
  .info-grid,
  .card-grid,
  .split-grid,
  .footer-grid,
  .field-row,
  .overview-grid,
  .link-grid,
  .stat-list {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy h1,
  .inner-hero h1,
  .auth-shell h1,
  .article-panel h1,
  .editor-panel h1 {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }
}

@media (max-width: 760px) {
  .main-nav,
  .hero-actions,
  .badge-row,
  .chip-row,
  .social-mini,
  .admin-actions {
    width: 100%;
  }

  .thread-card,
  .reply-card,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .thread-meta {
    text-align: left;
  }

  .parallax-stack {
    width: 100%;
    height: 23rem;
  }
}
