/* ==========================================================================
   ARGON TACTICAL — ARMA 3 PORTFOLIO STYLESHEET
   Clean, high-readability Arma 3 inspired theme without clutter
   ========================================================================== */

:root {
  color-scheme: dark light;
  --brand-color: #e88d2a;
  --brand-color-hover: #f59e0b;
  --brand-color-dim: rgba(232, 141, 42, 0.14);

  --bg-base: #0e110f;
  --bg-surface: #151a17;
  --bg-elevated: #1c231f;
  --bg-input: #101412;

  --border-subtle: #28322c;
  --border-strong: #39473e;

  --text-primary: #f1f5f2;
  --text-secondary: #c0cbc4;
  --text-muted: #8a9990;

  --danger: #ef4444;
  --success: #22c55e;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.62);
}

@media (prefers-color-scheme: light) {
  :root {
    --brand-color: #b45309;
  }
}

/* View Transitions reduced-motion compliance (same-document-transitions guide) */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  accent-color: var(--brand-color);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-color);
  color: #000;
  font-weight: 700;
  padding: 0.6rem 1rem;
  z-index: 9999;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(1280px, 100% - 2.5rem);
  margin-inline: auto;
}

h1, h2, h3, h4 {
  margin-top: 0;
  line-height: 1.28;
  text-wrap: balance;
}

h1:focus,
h2:focus {
  outline: none;
}

code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.07);
  padding: 0.14rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  color: #f8fafc;
}

.text-muted {
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.meta-text {
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 17, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 0;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-emblem {
  color: var(--brand-color);
  display: flex;
  align-items: center;
}

.brand-subtitle {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-color);
  font-weight: 700;
}

.brand-title {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  border-color: var(--brand-color);
  background: var(--brand-color-dim);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-categories-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--brand-color);
  background: var(--brand-color-dim);
}

.nav-external-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* ==========================================================================
   BUTTONS & PILLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.58rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--brand-color);
  color: #090c0a;
  border-color: var(--brand-color);
  font-weight: 700;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--brand-color-hover);
  border-color: var(--brand-color-hover);
}

.btn-outline {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--brand-color);
  color: var(--brand-color);
}

.btn-steam {
  background: #171d25;
  color: #66c0f4;
  border-color: #2a475e;
}
.btn-steam:hover,
.btn-steam:focus-visible {
  background: #1b2838;
  border-color: #66c0f4;
  color: #ffffff;
}

.btn-github {
  background: #161b22;
  color: #e6edf3;
  border-color: #30363d;
}
.btn-github:hover,
.btn-github:focus-visible {
  background: #21262d;
  border-color: #8b949e;
}

.btn-discord {
  background: #1e213a;
  color: #a5b4fc;
  border-color: #4338ca;
}
.btn-discord:hover,
.btn-discord:focus-visible {
  background: #312e81;
  border-color: #818cf8;
  color: #ffffff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}
.btn-danger:hover,
.btn-danger:focus-visible {
  background: var(--danger);
  color: #fff;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

/* ==========================================================================
   HOME LANDING PAGE: INTRO & HIGHLIGHTED MISSION SPOTLIGHT
   ========================================================================== */
.intro-section {
  padding: 2.2rem 0 1.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.intro-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.intro-copy {
  max-width: 68ch;
}

.intro-title {
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.intro-description {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin: 0;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.spotlight-section,
.categories-directory-section,
.home-releases-section,
.home-servers-section,
.home-news-section,
.catalog-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header-compact {
  margin-bottom: 0.9rem;
}

.section-kicker-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-color);
  margin: 0;
  font-weight: 700;
}

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

.section-title {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  margin: 0 0 0.25rem;
}

.section-subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
}

/* Highlighted Front-Page Mission Card */
.spotlight-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.spotlight-media-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: #090c0a;
  min-height: 320px;
}

.spotlight-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.spotlight-media-link:hover .spotlight-img {
  transform: scale(1.02);
}

.spotlight-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.spotlight-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.last-updated-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.spotlight-title-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 800;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.spotlight-title-link:hover,
.spotlight-title-link:focus-visible {
  color: var(--brand-color);
  text-decoration: underline;
}

.spotlight-summary {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 0 1rem;
}

/* ==========================================================================
   DISTINCT CATEGORIES DIRECTORY GRID
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 1.15rem;
}

.category-directory-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.category-directory-card:hover,
.category-directory-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.category-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.category-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
}

.category-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.category-card-cta {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand-color);
}

/* ==========================================================================
   REPOSITORY / MISSION CARDS (With Thumbnail, Clickable Title & Last Updated)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.4rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-thumb-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #090c0a;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.card-thumb-link:hover .card-thumb-img {
  transform: scale(1.03);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.card-title-heading {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0 0 0.45rem;
}

.card-title-link {
  color: var(--text-primary);
  text-decoration: none;
  width: fit-content;
}

.card-title-link:hover,
.card-title-link:focus-visible {
  color: var(--brand-color);
  text-decoration: underline;
}

.card-summary {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.card-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  margin-bottom: 0.95rem;
  font-size: 0.8rem;
}

.spec-item-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-item-val {
  font-weight: 600;
  color: var(--text-primary);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag-pill {
  font-size: 0.74rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   PAGE BANNERS, BREADCRUMBS & FILTER BAR
   ========================================================================== */
.page-banner {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2rem 0 1.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--brand-color);
  text-decoration: underline;
}

.page-banner-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin: 0.35rem 0 0.4rem;
}

.page-description {
  color: var(--text-secondary);
  margin: 0;
  max-width: 72ch;
}

.results-counter {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-tab:hover,
.category-tab:focus-visible {
  border-color: var(--brand-color);
  color: var(--text-primary);
}

.category-tab.active {
  background: var(--brand-color-dim);
  border-color: var(--brand-color);
  color: var(--text-primary);
}

.tab-count {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.08rem 0.45rem;
  border-radius: 99px;
  font-size: 0.75rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-label,
.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 2px rgba(232, 141, 42, 0.25);
}

.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   FULL PROJECT PAGE & SCREENSHOT GALLERY
   ========================================================================== */
.project-page-container {
  padding: 2rem 0 3.5rem;
}

.project-detail-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.project-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.project-main-column,
.project-side-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.brand-emblem-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.project-gallery-stage {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #060807;
}

.project-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.gallery-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.gallery-stage-nav-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.gallery-thumb-btn {
  padding: 0;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  opacity: 0.72;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.gallery-thumb-btn:hover,
.gallery-thumb-btn:focus-visible {
  border-color: var(--brand-color);
  opacity: 1;
}

.gallery-thumb-btn.active {
  border-color: var(--brand-color);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(232, 141, 42, 0.35);
}

.gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Media View Switcher (YouTube Video Trailer vs Screenshot Gallery) */
.media-switcher-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.media-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.media-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--brand-color);
}

.media-tab-btn.active {
  background: rgba(232, 141, 42, 0.15);
  color: var(--brand-color);
  border-color: var(--brand-color);
  box-shadow: 0 0 10px rgba(232, 141, 42, 0.2);
}

/* YouTube Video Embed & Façade Pattern */
.video-embed-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.video-embed-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  aspect-ratio: 16 / 9;
}

.video-facade {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #000;
  border: none;
  padding: 0;
  margin: 0;
  text-align: center;
  overflow: hidden;
}

.video-facade-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.video-facade::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6, 8, 7, 0.35) 0%, rgba(6, 8, 7, 0.8) 100%);
  transition: background 0.2s ease;
}

.video-facade:hover::before,
.video-facade:focus-visible::before {
  background: linear-gradient(180deg, rgba(6, 8, 7, 0.2) 0%, rgba(6, 8, 7, 0.65) 100%);
}

.video-facade-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
}

.video-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(232, 141, 42, 0.92);
  color: #0b0f0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  padding-left: 4px;
  box-shadow: 0 0 20px rgba(232, 141, 42, 0.45);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.video-facade:hover .video-play-btn,
.video-facade:focus-visible .video-play-btn {
  transform: scale(1.1);
  background: var(--brand-color);
  box-shadow: 0 0 30px rgba(232, 141, 42, 0.85);
}

.video-facade-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.video-facade-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.65);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.video-privacy-note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tag-pill.tag-video {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.gallery-thumb-video {
  position: relative;
}

.gallery-thumb-video .thumb-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(232, 141, 42, 0.92);
  color: #0b0f0d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding-left: 2px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.lightbox-body {
  padding: 0.75rem;
  background: #060807;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.lightbox-img {
  max-width: 100%;
  max-height: min(72dvh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75);
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav-btn {
  background: rgba(15, 20, 17, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.gallery-nav-btn:hover:not(:disabled),
.gallery-nav-btn:focus-visible:not(:disabled) {
  border-color: var(--brand-color);
  color: var(--brand-color);
  background: rgba(232, 141, 42, 0.14);
}

.gallery-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Lightbox Stage Overlay Chevron Buttons */
.lightbox-stage .gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(14, 18, 15, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: all 0.15s ease;
}

.lightbox-stage .gallery-nav-prev {
  left: 0.75rem;
}

.lightbox-stage .gallery-nav-next {
  right: 0.75rem;
}

.lightbox-stage .gallery-nav-btn:hover:not(:disabled),
.lightbox-stage .gallery-nav-btn:focus-visible:not(:disabled) {
  background: var(--brand-color);
  color: #000;
  border-color: var(--brand-color);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.65rem 0.5rem 0.2rem;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.lightbox-nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-tip-text {
  font-size: 0.8rem;
}

/* Color Picker Preview Swatch Box & Native Input */
.color-picker-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.color-swatch-box {
  position: relative;
  width: 42px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.color-swatch-box:hover,
.color-swatch-box:focus-within {
  border-color: var(--text-primary);
  transform: scale(1.04);
}

.color-picker-native {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}

.category-color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  vertical-align: middle;
  margin-right: 0.45rem;
}

/* Site Icon Preview Row in Admin Settings */
.site-icon-setting-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.site-icon-preview-box {
  width: 42px;
  height: 38px;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.site-icon-preview-box img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   GAME SERVERS & NEWS CARDS
   ========================================================================== */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.server-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.server-card.status-event {
  border-left-color: var(--brand-color);
}

.server-card.status-offline {
  border-left-color: var(--danger);
}

.server-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.server-title {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0;
}

.server-address-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.35rem;
}

.news-list-full {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   TABLES & FOOTER
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.site-footer {
  background: #090b0a;
  padding: 2.8rem 0 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-heading {
  font-size: 0.88rem;
  color: var(--brand-color);
  margin-bottom: 0.75rem;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a,
.footer-link-btn {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--brand-color);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ==========================================================================
   MODAL DIALOGS (prevent-page-scroll-under-modal-dialog & light-dismiss)
   ========================================================================== */
dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(5, 8, 6, 0.78);
  backdrop-filter: blur(4px);
}

.tactical-dialog {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--brand-color);
  border-radius: var(--radius-md);
  padding: 0;
  box-shadow: var(--shadow-lg);
  max-height: 94dvh;
}

.dialog-sm { width: min(520px, 94vw); }
.dialog-lg { width: min(900px, 94vw); }
.dialog-xl { width: min(1220px, 96vw); }
.dialog-lightbox {
  width: min(1120px, 96vw);
  max-width: 96vw;
  max-height: 94dvh;
  margin: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.dialog-lightbox[open] {
  display: flex;
  flex-direction: column;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-title {
  font-size: 1.15rem;
  margin: 0.2rem 0 0;
}

.dialog-close-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.dialog-close-btn:hover {
  border-color: var(--brand-color);
  color: var(--brand-color);
}

.dialog-body {
  padding: 1.4rem;
}

.dialog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 1.4rem;
  background: #0e1310;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-tab,
.admin-tab {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.dialog-tab.active,
.admin-tab.active {
  background: var(--brand-color-dim);
  border-color: var(--brand-color);
  color: var(--text-primary);
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.redirect-url-preview {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  word-break: break-all;
  margin: 0.85rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--brand-color);
}

/* ==========================================================================
   ADMIN PANEL FORMS & CONTROLS
   ========================================================================== */
.admin-auth-container {
  max-width: 460px;
  margin: 1rem auto;
}

.auth-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.form-group {
  margin-bottom: 0.95rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.input-with-upload {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.upload-btn-label {
  white-space: nowrap;
  cursor: pointer;
}

.text-btn {
  background: none;
  border: none;
  color: var(--brand-color);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.inline-transparency-note {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid #38bdf8;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.admin-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.admin-form-pane,
.admin-list-pane {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.form-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.admin-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 580px;
  overflow-y: auto;
}

.admin-list-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.status-banner {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
}

.status-banner.error {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.status-banner.success {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 1.4rem 0;
}

/* Consent Cards & Bottom Banner */
.consent-cards,
.rights-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.consent-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.consent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.consent-card h4 {
  margin: 0 0 0.25rem;
}

.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(14, 19, 16, 0.97);
  border-top: 2px solid var(--brand-color);
  padding: 1rem 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.consent-banner-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.consent-banner-text p {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  max-width: 78ch;
}

.consent-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.88rem;
}

progress {
  width: 100%;
  height: 10px;
}

/* ==========================================================================
   BRAND-CONSISTENT FORMS FALLBACK (@supports not (accent-color))
   ========================================================================== */
@supports not (accent-color: var(--brand-color)) {
  form input[type="checkbox"].visually-hidden {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
  }

  label {
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
  }

  input[type="checkbox"] + span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #ccc;
    background: white;
    border-radius: 4px;
    box-sizing: border-box;
    transition: all 0.2s ease;
  }

  input[type="checkbox"]:focus-visible + span::before {
    outline: 2px solid #000;
    outline-offset: 2px;
  }

  input[type="checkbox"]:checked + span::before {
    background-color: var(--brand-color, #e88d2a);
    border-color: var(--brand-color, #e88d2a);
  }

  input[type="checkbox"]:checked + span::after {
    content: "✓";
    position: absolute;
    left: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
  }

  progress {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background: #ccc;
    height: 8px;
    border-radius: 4px;
  }

  progress::-webkit-progress-bar {
    background-color: #ccc;
    border-radius: 4px;
  }

  progress::-webkit-progress-value {
    background-color: var(--brand-color, #e88d2a);
    border-radius: 4px;
  }

  progress::-moz-progress-bar {
    background-color: var(--brand-color, #e88d2a);
    border-radius: 4px;
  }
}

/* Responsive Breakpoints & Mobile Optimization */
@media (max-width: 1024px) {
  .spotlight-card,
  .project-detail-layout,
  .admin-split,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem 0 0.5rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-pages {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-categories-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-strong);
  }

  .nav-link {
    display: block;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
  }

  .nav-external-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--border-subtle);
  }

  .nav-external-group .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }

  .dialog-tabs,
  .admin-tab-group {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
  }

  .dialog-tabs::-webkit-scrollbar,
  .admin-tab-group::-webkit-scrollbar {
    display: none;
  }

  .dialog-tab,
  .admin-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1280px, 100% - 1.25rem);
  }

  /* Prevent mobile browser zoom on form input focus */
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 1rem;
  }

  /* Accessible touch targets */
  .btn {
    min-height: 44px;
  }

  .filter-bar,
  .form-row-2,
  .form-row-3,
  .form-row-4 {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .servers-grid,
  .news-grid,
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .spotlight-media-link {
    min-height: 200px;
    aspect-ratio: 16 / 9;
  }

  .spotlight-content {
    padding: 1.15rem;
  }

  .project-detail-header {
    padding: 1.15rem;
  }

  .content-panel {
    padding: 1.15rem;
  }

  .gallery-stage-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .gallery-stage-nav-group {
    justify-content: space-between;
    width: 100%;
  }

  .lightbox-body {
    padding: 0.5rem;
  }

  .lightbox-stage .gallery-nav-btn {
    width: 42px;
    height: 42px;
    font-size: 1.5rem;
  }

  .lightbox-stage .gallery-nav-prev {
    left: 0.35rem;
  }

  .lightbox-stage .gallery-nav-next {
    right: 0.35rem;
  }

  .lightbox-footer-bar {
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .lightbox-nav-controls {
    justify-content: center;
    width: 100%;
  }

  .consent-banner {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .consent-banner-actions {
    flex-direction: column;
    width: 100%;
  }

  .consent-banner-actions .btn {
    width: 100%;
  }

  .site-icon-setting-row {
    flex-wrap: wrap;
  }

  .color-picker-group {
    flex-wrap: wrap;
  }

  .admin-list-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .admin-list-item > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

/* ==========================================================================
   BBCODE ENGINE & RICH FORMATTING STYLES
   ========================================================================== */
.bb-bold {
  font-weight: 700;
  color: #fff;
}

.bb-italic {
  font-style: italic;
  color: #e2e8f0;
}

.bb-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand-color, #e88d2a);
  text-decoration-thickness: 1.5px;
}

.bb-strikethrough {
  text-decoration: line-through;
  opacity: 0.72;
}

.bb-size {
  display: inline;
  line-height: 1.45;
}

.bb-color {
  display: inline;
}

.bb-font {
  display: inline;
}

.bb-highlight {
  background: rgba(232, 141, 42, 0.25);
  color: #ffffff;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  border-bottom: 2px solid var(--brand-color, #e88d2a);
}

.bb-badge {
  display: inline-block;
  margin: 0 0.25rem;
  vertical-align: middle;
}

.bb-align {
  margin: 0.75rem 0;
}

.bb-align-center {
  text-align: center;
}

.bb-align-left {
  text-align: left;
}

.bb-align-right {
  text-align: right;
}

.bb-align-justify {
  text-align: justify;
}

.bb-h1 {
  font-size: 1.75rem;
  color: #ffffff;
  border-bottom: 2px solid var(--brand-color, #e88d2a);
  padding-bottom: 0.4rem;
  margin-top: 1.4rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading, 'Rajdhani', sans-serif);
  letter-spacing: 0.5px;
}

.bb-h2 {
  font-size: 1.35rem;
  color: var(--brand-color, #e88d2a);
  margin-top: 1.25rem;
  margin-bottom: 0.55rem;
  font-family: var(--font-heading, 'Rajdhani', sans-serif);
  letter-spacing: 0.5px;
}

.bb-h3 {
  font-size: 1.15rem;
  color: #f1f5f9;
  margin-top: 1.05rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-heading, 'Rajdhani', sans-serif);
}

.bb-hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 141, 42, 0.4), transparent);
  margin: 1.35rem 0;
}

/* Tactical Blockquote */
.bb-quote {
  margin: 0.95rem 0;
  padding: 0.85rem 1.15rem;
  background: rgba(18, 24, 32, 0.65);
  border-left: 3px solid var(--brand-color, #e88d2a);
  border-radius: 0 4px 4px 0;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.3);
}

.bb-quote-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-color, #e88d2a);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bb-quote-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--brand-color, #e88d2a);
}

.bb-quote-author {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.bb-quote-body {
  color: var(--text-secondary, #cbd5e1);
  font-style: italic;
  line-height: 1.55;
}

/* Classified Spoiler */
.bb-spoiler {
  margin: 0.95rem 0;
  border: 1px dashed rgba(232, 141, 42, 0.4);
  background: rgba(10, 14, 20, 0.7);
  border-radius: 4px;
  overflow: hidden;
}

.bb-spoiler-header {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  background: rgba(232, 141, 42, 0.08);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #e2e8f0;
  user-select: none;
  transition: background 0.15s ease;
}

.bb-spoiler-header:hover {
  background: rgba(232, 141, 42, 0.16);
  color: #fff;
}

.bb-spoiler-badge {
  background: #dc2626;
  border-color: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  letter-spacing: 0.5px;
}

.bb-spoiler-label {
  flex: 1;
}

.bb-spoiler-body {
  padding: 0.85rem 1rem;
  border-top: 1px dashed rgba(232, 141, 42, 0.25);
  background: rgba(0, 0, 0, 0.2);
  line-height: 1.55;
  color: #cbd5e1;
}

/* Code Blocks */
.bb-code-block {
  margin: 0.95rem 0;
  padding: 0.85rem 1.15rem;
  background: #090d13;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  overflow-x: auto;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.86rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.bb-code-inline {
  padding: 0.15rem 0.45rem;
  background: #090d13;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.88em;
  color: #38bdf8;
}

/* Lists */
.bb-list {
  margin: 0.65rem 0 0.95rem 1.5rem;
  padding-left: 0.5rem;
}

.bb-list-item {
  margin-bottom: 0.4rem;
  line-height: 1.55;
  color: var(--text-primary, #f1f5f9);
}

.bb-list-item::marker {
  color: var(--brand-color, #e88d2a);
}

/* Links & Images */
.bb-link {
  color: var(--brand-color, #e88d2a);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.bb-link:hover {
  color: #ffb861;
  text-shadow: 0 0 8px rgba(232, 141, 42, 0.4);
}

.bb-img-wrap {
  margin: 1rem 0;
  max-width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.bb-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: zoom-in;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bb-image:hover {
  transform: scale(1.01);
  border-color: var(--brand-color, #e88d2a);
}

/* ==========================================================================
   ADMIN BBCODE TOOLBAR & LIVE PREVIEW PANE
   ========================================================================== */
.bb-editor-group {
  margin-bottom: 1.25rem;
}

.bb-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.bb-mode-tabs {
  display: flex;
  gap: 0.3rem;
}

.bb-mode-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted, #94a3b8);
  padding: 0.22rem 0.65rem;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bb-mode-tab:hover {
  border-color: var(--brand-color, #e88d2a);
  color: #fff;
}

.bb-mode-tab.active {
  background: rgba(232, 141, 42, 0.18);
  border-color: var(--brand-color, #e88d2a);
  color: var(--brand-color, #e88d2a);
}

.bb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  background: #141b24;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

.bb-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  padding: 0.22rem 0.5rem;
  font-size: 0.8rem;
  font-family: inherit;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1.25;
  transition: all 0.15s ease;
  user-select: none;
}

.bb-tool-btn:hover {
  background: rgba(232, 141, 42, 0.22);
  border-color: var(--brand-color, #e88d2a);
  color: #fff;
}

.bb-tool-select {
  background: #0f1620;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  padding: 0.22rem 0.45rem;
  font-size: 0.78rem;
  font-family: inherit;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.bb-tool-select:hover,
.bb-tool-select:focus {
  border-color: var(--brand-color, #e88d2a);
  outline: none;
}

.bb-textarea {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.bb-preview-panel {
  min-height: 160px;
  max-height: 480px;
  overflow-y: auto;
  padding: 1.15rem;
  background: rgba(12, 17, 24, 0.95);
  border: 1px solid rgba(232, 141, 42, 0.45);
  border-radius: 0 0 4px 4px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

