/* ============================================================
   Husie Hotters — Design System v2
   Modern, sharp, premium automotive dark theme
   background: var(--color-nav-bg); | Nav: #111820 | Accent: #d42b07 | Mid: #1c2b38
   ============================================================ */

:root {
  /* Common Structural / Font Variables */
  --font-headline: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Inter', 'Roboto Condensed', system-ui, sans-serif;
  --radius: 0px;
  --radius-lg: 0px;
  --transition: 0.16s ease;
  --max-width: 1260px;
  --color-red: #d42b07;
  --color-red-dark: #a82005;
  --color-red-light: #f03010;
  --color-gold: #e8a020;

  /* THEME VARIABLES (Default: Original Dark) */
  --color-body-bg: #0f1923;
  --color-nav-bg: #111820;
  --color-mid: #1c2b38;
  --color-surface: #1a2632;
  --color-text: #ffffff;
  --color-text-light: #cfd8dc;
  --color-border: #1c2b38;
  --color-muted: #8a9bac;
  --color-white: #ffffff;
  --color-cream: #f5f0e8;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 5px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}


/* === RESET === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-body-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

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

a {
  color: var(--color-red);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-red-light);
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  background: var(--color-nav-bg);
  border-bottom: 2px solid var(--color-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  transition: transform var(--transition);
}

.site-logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main {
  font-family: var(--font-headline);
  font-size: 1.65rem;
  color: var(--color-text);
  /* Will override below for light theme */
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 0.6rem;
  color: var(--color-muted);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 600;
}

/* No checkerboard stripe — clean modern header */
.header-stripe {
  display: none;
}

.main-nav>ul {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.main-nav ul li a {
  display: block;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.main-nav ul li a.active {
  color: var(--color-red);
  background: transparent;
}

.main-nav ul li a.nav-login {
  background: var(--color-red);
  color: var(--color-white);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  margin-left: 0.3rem;
}

.main-nav ul li a.nav-login:hover {
  background: var(--color-red-dark);
  color: var(--color-text);
}

.main-nav ul li a.nav-admin {
  color: var(--color-gold);
}

.main-nav ul li a.nav-admin:hover {
  background: rgba(232, 160, 32, 0.1);
  color: var(--color-gold);
}

.main-nav ul li a.nav-logout {
  color: #555;
  font-size: 0.72rem;
}

.main-nav ul li a.nav-logout:hover {
  color: #aaa;
  background: rgba(255, 255, 255, 0.05);
}

.main-nav ul li a.nav-members:hover {
  color: var(--color-white);
  background: rgba(var(--color-white-rgb, 255, 255, 255), 0.07);
}

/* Theme overrides for contrast */
.theme-light .logo-main,
.theme-light .main-nav ul li a:hover,
.theme-light .main-nav ul li a.nav-login {
  color: #111 !important;
}

.theme-light .logo-main {
  color: var(--color-red) !important;
  /* Hot Rod Red logo in light mode */
}

.theme-light .main-nav ul li a {
  color: #333;
}

.theme-light .main-nav ul li a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.theme-light .main-nav ul li a.active {
  color: var(--color-red);
}

.theme-light .nav-user-cog {
  background: #eee;
  color: #333;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-muted);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
  position: relative;
  width: 100%;
  height: calc(100vh - 84px);
  overflow: hidden;
  background: var(--color-mid);
}

.hero-slider::before,
.hero-slider::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10%;
  /* Fading edges */
  z-index: 3;
  pointer-events: none;
}

.hero-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--color-body-bg) 0%, transparent 100%);
}

.hero-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--color-body-bg) 0%, transparent 100%);
}

.slider-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(to top, var(--color-body-bg) 0%, transparent 100%);
  z-index: 3;
  pointer-events: none;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center !important;
  opacity: 0;
  transition: opacity 0.85s ease;
  /* Optimization for animation */
  will-change: transform;
  filter: sepia(0.4) saturate(0.9) hue-rotate(-10deg) brightness(0.95);
}

.slide.active {
  opacity: 1;
  z-index: 1;
  animation: kenBurns 20s ease-in-out forwards;
}

/* Subtle drifting zoom (more cinematic, less aggressive) */
@keyframes kenBurns {
  0% {
    transform: scale(1);
    background-position: center center;
  }

  100% {
    transform: scale(1.08);
    background-position: center center;
  }
}

.slide-fallback {
  background: linear-gradient(135deg, #0a1520 0%, #1c2b38 60%, #0f1923 100%);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  /* Bottom-weighted dark gradient for text legibility */
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0.50) 65%,
      rgba(0, 0, 0, 0.80) 100%);
  z-index: 1;
}

/* Stronger Blue vintage wash — sits between image and dark overlay */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 40, 140, 0.62);
  /* Even deeper blue tint */
  mix-blend-mode: multiply;
  z-index: 0;
  pointer-events: none;
}

.slide-caption {
  position: absolute;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3em 1.2em;
  border-radius: 2px;
  white-space: nowrap;
  z-index: 3;
  backdrop-filter: blur(4px);
}

/* Overlaid text + CTA */
.slider-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
  text-align: center;
  padding: 1.5rem;
  pointer-events: none;
}

.slider-title {
  font-family: var(--font-headline);
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--color-white);
  letter-spacing: 6px;
  line-height: 1;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.slider-tagline {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  font-weight: 600;
}

.slider-content .btn {
  pointer-events: all;
}

/* Arrows */
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  backdrop-filter: blur(4px);
}

.slider-prev {
  left: 1rem;
}

.slider-next {
  right: 1rem;
}

.slider-prev:hover,
.slider-next:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-text);
}

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 5;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.slider-dot.active {
  background: var(--color-red);
  transform: scale(1.3);
}

/* CMS Ingress — inline under slider title */
.slider-ingress {
  max-width: 560px;
  margin: 0.6rem auto 1.5rem;
  pointer-events: none;
}

.slider-ingress h2 {
  display: none;
}

.slider-ingress p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0 0 0.35rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}

.slider-ingress a {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 640px) {
  .slider-ingress {
    display: none;
  }
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--color-nav-bg);
  padding: 1.75rem 0;
}

.page-title {
  font-family: var(--font-headline);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--color-red);
  letter-spacing: 2px;
}

.page-hero .btn-hero-sm {
  margin-top: 0.6rem;
}

.hero-sub {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.breadcrumb {
  color: #666;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.breadcrumb a {
  color: #8a9bac;
}

.breadcrumb a:hover {
  color: var(--color-white);
}

.post-meta {
  color: #888;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.45em 1.1em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 2px solid var(--color-red);
  background: var(--color-red);
  color: var(--color-white);
  border-radius: 0;
  cursor: pointer;
  vertical-align: middle;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  color: var(--color-text);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 43, 7, 0.35);
}

.btn-hero {
  font-size: 0.88rem;
  padding: 0.7em 1.8em;
  letter-spacing: 1.5px;
}

.btn-hero-sm {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--color-text-light);
}

.btn-hero-sm:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-text);
}

.btn-sm {
  font-size: 0.72rem;
  padding: 0.42em 0.85em;
  letter-spacing: 0.8px;
}

.btn-edit {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #111;
}

.btn-edit:hover {
  background: #c8870e;
  border-color: #c8870e;
  color: #000;
  box-shadow: none;
}

.btn-save {
  background: #1a6b1a;
  border-color: #1a6b1a;
  color: var(--color-text);
}

.btn-save:hover {
  background: #145014;
  border-color: #145014;
  box-shadow: none;
}

.btn-cancel {
  background: transparent;
  border-color: #ccc;
  color: var(--color-muted);
}

.btn-cancel:hover {
  background: #f0f0f0;
  color: #333;
  box-shadow: none;
}

.btn-danger {
  background: #a00;
  border-color: #a00;
  color: var(--color-text);
}

.btn-danger:hover {
  background: #700;
  border-color: #700;
  box-shadow: none;
}

.btn-new {
  background: #1a6b1a;
  border-color: #1a6b1a;
  color: var(--color-text);
}

.btn-new:hover {
  background: #145014;
  border-color: #145014;
  box-shadow: none;
}

.btn-new-post {
  display: block;
  text-align: center;
  margin-top: 1rem;
  background: transparent;
  border: 2px dashed rgba(0, 0, 0, 0.18);
  color: #aaa;
}

.btn-new-post:hover {
  border-color: var(--color-red);
  color: var(--color-red);
  background: rgba(212, 43, 7, 0.04);
  box-shadow: none;
}

.btn-login {
  width: 100%;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0.75em;
}

.btn-sidebar {
  display: block;
  padding: 0.5em 0.9em;
  text-align: center;
  background: var(--color-red);
  color: var(--color-text);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: background var(--transition);
}

.btn-sidebar:hover {
  background: var(--color-red-dark);
  color: var(--color-text);
}

.btn-sidebar-fb {
  background: #1877f2;
}

.btn-sidebar-fb:hover {
  background: var(--color-body-bg);
  color: var(--color-text);
}

/* ============================================================
   INNER PAGE LAYOUT
   ============================================================ */
.page-layout {
  display: block;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  box-sizing: border-box;
}

.page-content {
  display: block;
  width: 100%;
  background: var(--color-surface);
  border-top: 3px solid var(--color-red);
  box-shadow: var(--shadow);
  padding: 2rem 2.5rem;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.8;
  box-sizing: border-box;
}

.page-content h2 {
  font-family: var(--font-headline);
  font-size: 1.6rem;
  color: var(--color-red);
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

.page-content h3 {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  letter-spacing: 1px;
  margin: 1.5rem 0 0.5rem;
}

.page-content p {
  margin-bottom: 0.9rem;
}

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 0.9rem;
}

.page-content li {
  margin-bottom: 0.3rem;
}

.page-content strong {
  color: var(--color-text);
}

.page-content a {
  color: var(--color-red);
}

/* ============================================================
   HOME LAYOUT
   ============================================================ */
.home-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.home-main {
  min-width: 0;
}

.home-sidebar {
  padding-top: 3.2rem;
  /* aligns with first news card, past section-divider */
  align-self: start;
}

/* White content card */
.content-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  border-top: 3px solid var(--color-red);
}

.content-card h2 {
  font-family: var(--font-headline);
  font-size: 1.55rem;
  color: var(--color-red);
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

.content-card h3 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  color: #333;
  letter-spacing: 1px;
  margin: 1.25rem 0 0.4rem;
}

.content-card ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.content-card li {
  margin-bottom: 0.3rem;
  color: var(--color-text);
}

.content-card p {
  margin-bottom: 0.9rem;
}

.content-card strong {
  color: var(--color-text);
}

.content-card a {
  color: var(--color-red);
}

/* CMS Block */
.cms-block {
  font-size: 0.97rem;
  line-height: 1.8;
}

.cms-block h2 {
  font-family: var(--font-headline);
  font-size: 1.55rem;
  color: var(--color-red);
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

.cms-block h3 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  color: #333;
  margin: 1.25rem 0 0.4rem;
}

.cms-block ul {
  padding-left: 1.5rem;
  list-style: disc;
  margin-bottom: 1rem;
}

.cms-block li {
  margin-bottom: 0.3rem;
}

.cms-block p {
  margin-bottom: 0.9rem;
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* News cards */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--color-red);
  transition: box-shadow var(--transition), transform var(--transition);
}

.news-card:hover {
  box-shadow: var(--shadow);
  transform: translateX(2px);
}

.news-card-meta {
  font-size: 0.73rem;
  color: var(--color-text-light);
  margin-bottom: 0.3rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.news-card-title {
  font-family: var(--font-headline);
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
  color: var(--color-red);
}

.news-card-title a {
  color: #111;
}

.news-card-title a:hover {
  color: var(--color-red);
}

.news-card-excerpt {
  color: var(--color-text-light);
  font-size: 0.87rem;
  margin-bottom: 0.6rem;
}

.news-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.news-archive {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.news-card-full {
  padding: 1.4rem 1.75rem;
}

/* Sidebar */
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
  overflow: hidden;
}

.sidebar-card h3 {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-event-list li {
  margin-bottom: 0.35rem;
  border-bottom: 1px solid #f3f3f3;
  padding-bottom: 0.3rem;
}

.sidebar-event-list li:last-child {
  border-bottom: none;
}

.sidebar-event-list li a {
  color: #333;
  font-size: 0.87rem;
  font-weight: 500;
}

.sidebar-event-list li a:hover {
  color: var(--color-red);
}

/* ============================================================
   GENERIC PAGE
   ============================================================ */

.edit-toolbar {
  margin-bottom: 0.75rem;
}

.editor-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.save-status {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-top: 0.6rem;
}

.save-status.ok {
  background: #eafaea;
  border: 1px solid #4caf50;
  color: #256325;
}

.save-status.err {
  background: #ffeaea;
  border: 1px solid red;
  color: #900;
}

/* ============================================================
   FLOATING EDIT BUTTON (admin only)
   ============================================================ */
.fab-edit {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 3rem;
  height: 3rem;
  background: var(--color-gold);
  color: #111;
  border: none;
  border-radius: 0;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  transition: background var(--transition), transform var(--transition);
}

.fab-edit:hover {
  background: #c8870e;
  transform: scale(1.08);
}

.editor-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border);
}

#editorContainer {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1rem;
  margin: 1rem 0;
}


/* ============================================================
   NEWS POST
   ============================================================ */
.post-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}

.post-cover-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.post-body {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text);
}

.post-body h2 {
  font-family: var(--font-headline);
  font-size: 1.55rem;
  color: var(--color-red);
  letter-spacing: 1.5px;
  margin: 1.25rem 0 0.6rem;
}

.post-body h3 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  color: var(--color-red);
  margin: 1rem 0 0.4rem;
}

.post-body p {
  margin-bottom: 1rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.post-body li {
  margin-bottom: 0.35rem;
}

.post-admin-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Post form */
.post-form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin: 1.5rem 0;
}

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

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.6em 0.85em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-red);
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-section {
  margin: 2rem 0;
}

.gallery-cat-title {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  color: var(--color-white);
  letter-spacing: 2px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery-cat-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color var(--transition), transform var(--transition);
  aspect-ratio: 4/3;
  background: var(--color-mid);
}

.gallery-item:hover {
  border-color: var(--color-red);
  transform: scale(1.02);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  font-size: 1.5rem;
}

.gallery-caption {
  font-size: 0.75rem;
  color: #ddd;
  text-align: center;
  padding: 0 0.5rem;
}

.gallery-delete-btn {
  background: var(--color-red-dark);
  border: 1px solid var(--color-red);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 0.2em 0.5em;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background var(--transition);
}

.gallery-delete-btn:hover {
  background: #700;
}

.upload-panel {
  background: var(--color-mid);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  animation: slideDown 0.18s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-panel .form-group label {
  color: #bbb;
}

.upload-panel .form-input {
  background: var(--color-body-bg);
  border-color: rgba(255, 255, 255, 0.15);
  color: #eee;
}

.upload-panel .form-input:focus {
  border-color: var(--color-red);
}

.upload-form .form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.upload-form .form-group {
  flex: 1;
  min-width: 160px;
  margin-bottom: 0;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox figcaption {
  color: #888;
  font-size: 0.8rem;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--color-red);
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 1001;
}

.lightbox-close:hover {
  background: var(--color-red-dark);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ddd;
  font-size: 1.3rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 1001;
  border-radius: var(--radius);
}

.lightbox-prev {
  left: 0.75rem;
}

.lightbox-next {
  right: 0.75rem;
}

/* ============================================================
   GALLERY ALBUM TILES
   ============================================================ */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.album-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 3px solid var(--color-red);
  display: block;
}

.album-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.album-cover-warp {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.album-card:hover .album-cover {
  transform: scale(1.08);
}

.album-info {
  padding: 1.25rem;
  text-align: center;
}

.album-title {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
}

.album-count {
  font-size: 0.8rem;
  color: #888;
}

.gallery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.gallery-back-link:hover {
  color: var(--color-red);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--color-red);
  color: var(--color-text);
  border-color: var(--color-red);
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  border-top: 3px solid var(--color-red);
}

.login-badge {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.login-badge img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.login-title {
  font-family: var(--font-headline);
  font-size: 1.9rem;
  color: var(--color-red);
  letter-spacing: 2px;
  margin-bottom: 1.25rem;
}

.login-form {
  text-align: left;
}

.login-form .form-group {
  margin-bottom: 0.9rem;
}

.login-form .form-input {
  background: var(--color-mid);
}

.login-back {
  display: block;
  margin-top: 1.25rem;
  color: #aaa;
  font-size: 0.82rem;
}

.login-back:hover {
  color: var(--color-red);
}

.alert {
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
  font-size: 0.88rem;
}

.alert-error {
  background: #fff0f0;
  border: 1px solid #f0a0a0;
  color: #900;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-dashboard {
  padding: 1.5rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.admin-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
}

.admin-section h2 {
  font-family: var(--font-headline);
  font-size: 1.3rem;
  color: var(--color-text);
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.admin-actions-top {
  margin-bottom: 0.75rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  text-align: left;
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.45rem 0.6rem;
  border-bottom: 2px solid var(--color-border);
}

.admin-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.admin-table td small {
  color: #999;
  font-size: 0.74rem;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.logout-link {
  color: #999;
  font-size: 0.82rem;
}

.logout-link:hover {
  color: var(--color-red);
}

/* Slider admin list */
.slider-upload-form {
  margin-bottom: 1rem;
}

.slider-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.slider-admin-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.9rem;
  background: #fafafa;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.slider-admin-thumb {
  width: 90px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.slider-admin-caption {
  flex: 1;
  font-size: 0.88rem;
  color: #444;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   404
   ============================================================ */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-headline);
  font-size: 6rem;
  line-height: 1;
  color: var(--color-red);
  margin-bottom: 0.5rem;
}

.error-content h2 {
  font-family: var(--font-headline);
  font-size: 1.4rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.error-content p {
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.no-content {
  text-align: center;
  padding: 2.5rem;
  color: var(--color-muted);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  font-size: 0.92rem;
}

.neon-text {
  color: var(--color-white);
}

/* ============================================================
   QUILL
   ============================================================ */
.ql-toolbar {
  background: #f5f5f5;
  border-color: var(--color-border) !important;
  border-radius: var(--radius) var(--radius) 0 0;
}

.ql-container {
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 280px;
  border-color: var(--color-border) !important;
  border-radius: 0 0 var(--radius) var(--radius);
}

.ql-editor {
  min-height: 280px;
  font-size: 1rem;
  line-height: 1.75;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-nav-bg);
  border-top: 2px solid var(--color-border);
  margin-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.75rem;
  padding: 2rem 1.25rem 1.5rem;
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.footer-col p {
  color: #666;
  font-size: 0.87rem;
  line-height: 1.6;
}

.footer-col a {
  color: #555;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-col ul li {
  margin-bottom: 0.3rem;
}

.footer-col ul li a {
  color: #555;
  font-size: 0.87rem;
}

.footer-col ul li a:hover {
  color: var(--color-red-light);
}

.footer-bottom {
  text-align: center;
  padding: 0.9rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: #444;
}

.footer-bottom a {
  color: #555;
}

.footer-bottom a:hover {
  color: #999;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 840px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

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

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    border-bottom: 2px solid var(--color-red);
    padding: 0.5rem 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
  }

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

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav ul li a {
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.65rem 1rem;
  }

  .site-header {
    position: relative;
  }

  .hero-slider {
    height: 52vh;
    min-height: 280px;
  }

  .slider-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .content-card,
  .post-body,
  .post-form {
    padding: 1.1rem 1.25rem;
  }

  .upload-form .form-row {
    flex-direction: column;
  }

  .slider-admin-item {
    flex-wrap: wrap;
  }

  .slider-admin-thumb {
    width: 70px;
    height: 44px;
  }
}

/* ==========================================================================
   CLASSIC BULLETIN BOARD FORUM (vBulletin/FusionBB Style)
   ========================================================================== */

.members-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 3rem auto;
  max-width: var(--max-width);
}

/* Common Board Component */
.bb-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.bb-header {
  background: var(--color-nav-bg);
  /* Dark header bar */
  color: var(--color-text);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bb-header h2 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Thread List Table */
.bb-table {
  width: 100%;
  border-collapse: collapse;
}

.bb-table th {
  background: var(--color-mid);
  border-bottom: 2px solid var(--color-border);
  padding: 0.6rem 1rem;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-text);
  font-weight: 700;
}

.bb-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.bb-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.bb-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.bb-thread-title {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-red);
  text-decoration: none;
  margin-bottom: 0.2rem;
}

.bb-thread-title:hover {
  text-decoration: underline;
}

.bb-author-sub {
  font-size: 0.8rem;
  color: var(--color-text);
  opacity: 0.8;
}

.bb-stats-cell {
  text-align: center;
  color: var(--color-text);
  font-size: 0.95rem;
}

.bb-lastpost-cell {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* Postbit (Thread View) - Streamlined */
.postbit {
  display: flex;
  border: 1px solid var(--color-border);
  border-bottom: none;
  /* Remove bottom border to stack */
  background: var(--color-surface);
}

.postbit:last-of-type {
  border-bottom: 1px solid #ccc;
  /* Close the last post */
}

.postbit-sidebar {
  width: 180px;
  background: var(--color-mid);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  text-align: center;
  flex-shrink: 0;
}

.postbit-username {
  display: block;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.postbit-avatar {
  width: 80px;
  height: 80px;
  background-color: var(--color-mid);
  background-image: url('/img/default-avatar.png');
  background-position: center;
  background-size: cover;
  border-radius: 0;
  margin: 0 auto 0.75rem;
  border: 1px solid var(--color-border);
}

.postbit-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.postbit-role {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 777;
  color: #111;
  background: var(--color-gold);
  padding: 3px 10px;
  border-radius: 0;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.postbit-role.role-admin {
  color: var(--color-text);
  background: var(--color-nav-bg);
  border: 1px solid var(--color-red);
  box-shadow: 0 2px 6px rgba(179, 0, 0, 0.15);
}

.postbit-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.postbit-header {
  background: var(--color-mid);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: #eee;
  display: flex;
  justify-content: space-between;
}

.control-link {
  color: #d42b07;
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 1rem;
  cursor: pointer;
}

.control-link:hover {
  text-decoration: underline;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.postbit-body {
  padding: 1.5rem;
  line-height: 1.7;
  color: var(--color-text);
  font-size: 1.05rem;
  flex: 1;
  white-space: pre-wrap;
}

/* User Dropdown */
.nav-user-dropdown {
  position: relative;
  margin-left: 1rem;
}

.nav-user-cog {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  padding: 0.35rem 0.75rem;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s;
}

.nav-user-cog:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--color-red);
}

.nav-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cog-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 0;
  min-width: 160px;
  z-index: 2000;
  padding: 0.5rem 0;
  list-style: none !important;
  margin: 0 !important;

  /* Hidden by default, toggled via JS explicit class */
  display: none !important;
}

.user-dropdown-menu.active {
  display: block !important;
}

.user-dropdown-menu li {
  margin: 0 !important;
}

.user-dropdown-menu a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: #333 !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: none !important;
  border: none !important;
  text-align: left;
}

.user-dropdown-menu a:hover {
  background: #f1f1f1 !important;
  color: var(--color-red) !important;
}

/* Forms & UI */
.bb-form-container {
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.bb-panel .ql-toolbar {
  background: #f0f0f0 !important;
  border-color: #ccc !important;
}

.bb-panel .ql-container {
  background: #fff !important;
  color: #111 !important;
  border-color: #ccc !important;
}

.bb-panel .ql-editor {
  color: #111 !important;
}

.bb-form-container .form-input {
  background: var(--color-body-bg) !important;
  color: #fff !important;
  border-color: #444 !important;
}

.forum-textarea {
  min-height: 200px;
  resize: vertical;
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 0;
  padding: 1rem;
  font-family: inherit;
  color: #111 !important;
}

.bb-reply-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2rem;
  border-radius: 0;
  color: var(--color-text);
}

/* Chat (Refined Automotive Style) */
#chat {
  width: 100%;
  border: 1px solid #333;
}

.chat-messages {
  height: 550px;
  /* Slightly taller for better flow */
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--color-surface);
}

.chat-msg {
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  transition: background 0.1s;
}

.chat-msg:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chat-content {
  flex: 1;
}

.chat-controls {
  display: flex;
  gap: 0.5rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.chat-msg:hover .chat-controls {
  opacity: 1;
}

.chat-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 5px;
  cursor: pointer;
  color: #ff9800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ff9800;
  color: #ffb74d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chat-action-btn.delete-btn:hover {
  color: #ff5722;
  border-color: #ff5722;
  background: rgba(255, 87, 34, 0.1);
}

.chat-author {
  font-weight: 700;
  color: var(--color-gold);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.chat-time {
  font-size: 0.7rem;
  color: #bbb;
  margin-right: 0.6rem;
  font-family: var(--font-body);
}

.chat-text {
  color: var(--color-text);
  word-break: break-all;
}

.chat-form {
  padding: 1.25rem;
  background: var(--color-mid);
  border-top: 2px solid var(--color-border);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.chat-input {
  flex: 1;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 1px solid #ddd !important;
  padding: 0.8rem 1rem !important;
}

@media (max-width: 768px) {
  .postbit {
    flex-direction: column;
    border-bottom: 1px solid #ccc;
  }

  .postbit-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-align: left;
    gap: 1rem;
  }

  .postbit-avatar {
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .bb-table th:nth-child(3) {
    display: none;
  }
}

/* Chat Pickers (Emoji/GIF) */
.chat-picker-popover {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #fff;
  border: 2px solid #333;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
  flex-direction: column;
  width: 300px;
  max-height: 400px;
}

.chat-picker-popover.show {
  display: flex;
}

.chat-picker-header {
  padding: 0.75rem;
  background: #f1f1f1;
  border-bottom: 1px solid #ddd;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-picker-close {
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.gif-search-container {
  padding: 0.5rem;
  background: #fff;
}

.gif-search-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
}

.gif-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 5px;
  overflow-y: auto;
  max-height: 300px;
}

.gif-item {
  cursor: pointer;
  width: 100%;
  height: 100px;
  object-fit: cover;
  transition: transform 0.1s;
}

.gif-item:hover {
  transform: scale(1.05);
}

.btn-sm {
  font-size: 0.75rem !important;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-text);
  border: none;
  cursor: pointer;
}

/* ============================================================
   QUILL IMAGE RESIZE AGGRESSIVE FIX
   ============================================================ */
.ql-image-resize-handler,
.ql-image-resize-handle,
.ql-image-resizer div:not(.ql-image-resizer-overlay),
div[style*="cursor: nw-resize"],
div[style*="cursor: ne-resize"],
div[style*="cursor: sw-resize"],
div[style*="cursor: se-resize"],
div[style*="cursor: nwse-resize"],
div[style*="cursor: nesw-resize"] {
  display: block !important;
  visibility: visible !important;
  background-color: #ff6600 !important;
  border: 2px solid #fff !important;
  width: 16px !important;
  height: 16px !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7) !important;
}

.ql-editor img {
  cursor: pointer !important;
}

.ql-image-resizer {
  z-index: 9999 !important;
}

/* ============================================================
   APPEARANCE / THEME SELECTOR
   ============================================================ */
.appearance-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 400px;
}

.appearance-card h3 {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.theme-form .form-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-form select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-body-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  flex-grow: 1;
  cursor: pointer;
}

.mini-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #2e7d32;
  font-weight: 600;
}