/* ===========================
   Mini Forum — Thread & Posts Styles
   Filename: assets/forum-thread.css
   =========================== */

/* --- CSS Variables (light) --- */
:root{
  --forum-bg: #f7f8fa;
  --forum-surface: #ffffff;
  --forum-text: #111827;
  --forum-muted: #6b7280;
  --forum-border: #e5e7eb;
  --forum-accent: #2563eb;         /* Primary blue */
  --forum-accent-2: #0ea5e9;       /* Secondary (links hover) */
  --forum-warn: #f59e0b;
  --forum-success: #10b981;
  --forum-danger: #ef4444;
  --forum-radius: 16px;
  --forum-radius-sm: 10px;
  --forum-shadow: 0 10px 24px rgba(0,0,0,.05);
  --forum-shadow-sm: 0 6px 16px rgba(0,0,0,.05);
  --forum-focus: 0 0 0 3px rgba(37, 99, 235, .35);
  --forum-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

/* --- Dark mode --- 
@media (prefers-color-scheme: dark){
  :root{
    --forum-bg: #0b0f14;
    --forum-surface: #0f172a;
    --forum-text: #e5e7eb;
    --forum-muted: #9ca3af;
    --forum-border: #1f2937;
    --forum-accent: #60a5fa;
    --forum-accent-2: #38bdf8;
    --forum-shadow: 0 10px 24px rgba(0,0,0,.45);
    --forum-shadow-sm: 0 6px 16px rgba(0,0,0,.35);
    --forum-focus: 0 0 0 3px rgba(96, 165, 250, .4);
  }
} */

/* --- Base layout --- */
#forum-app.forum-container{
  font-family: var(--forum-font);
  color: var(--forum-text);
  background: var(--forum-bg);
  min-height: 70vh;
  padding: clamp(14px, 2vw, 24px);
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Thread Header --- */
.forum-thread-header{
  background: var(--forum-surface);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius);
  padding: clamp(18px, 3vw, 24px);
  margin-bottom: 20px;
  box-shadow: var(--forum-shadow);
}

/* Thread Header Layout */
.thread-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.thread-title {
  flex: 1;
  margin: 0;
}

/* Thread Status Controls */
.thread-status-controls {
  flex-shrink: 0;
}

/* OP Controls - Original button styling */
.op-status-controls .btn-thread-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  background: var(--forum-surface);
  color: var(--forum-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--forum-shadow-sm);
}

.op-status-controls .btn-thread-status:not(:disabled):hover {
  border-color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
  transform: translateY(-1px);
}

.op-status-controls .btn-thread-status:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Admin/Moderator Controls - Dropdown styling */
.admin-status-controls {
  min-width: 280px;
}

.status-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--forum-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  background: var(--forum-surface);
  color: var(--forum-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-select:focus {
  outline: none;
  border-color: var(--forum-accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--forum-accent) 20%, transparent);
}

.status-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-change-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--forum-accent);
  border-radius: var(--forum-radius-sm);
  background: var(--forum-accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-change-status:not(:disabled):hover {
  background: var(--forum-accent-2);
  border-color: var(--forum-accent-2);
  transform: translateY(-1px);
  box-shadow: var(--forum-shadow);
}

.btn-change-status:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-change-status.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-change-status.loading .change-icon {
  animation: spin 1s linear infinite;
}

/* Status-specific styling for OP controls */
.op-status-controls .btn-thread-status[data-status="open"] {
  border-color: var(--forum-border);
  color: var(--forum-text);
  background: var(--forum-surface);
}

.op-status-controls .btn-thread-status[data-status="open"]:not(:disabled):hover {
  background: color-mix(in oklab, var(--forum-border) 10%, var(--forum-surface));
  border-color: var(--forum-accent);
}

.op-status-controls .btn-thread-status[data-status="solved"] {
  border-color: #22c55e;
  color: #16a34a;
  background: color-mix(in oklab, #22c55e 5%, var(--forum-surface));
}

.op-status-controls .btn-thread-status[data-status="solved"]:not(:disabled):hover {
  background: color-mix(in oklab, #22c55e 15%, var(--forum-surface));
  border-color: #16a34a;
}

.op-status-controls .btn-thread-status[data-status="closed"] {
  border-color: #ef4444;
  color: #dc2626;
  background: color-mix(in oklab, #ef4444 5%, var(--forum-surface));
}

.op-status-controls .btn-thread-status[data-status="closed"]:not(:disabled):hover {
  background: color-mix(in oklab, #ef4444 15%, var(--forum-surface));
  border-color: #dc2626;
}

.op-status-controls .btn-thread-status.loading {
  pointer-events: none;
  opacity: 0.7;
}

.op-status-controls .btn-thread-status.loading .status-icon {
  animation: spin 1s linear infinite;
}

/* View Toggle Controls */
.forum-view-controls {
  margin: 16px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  overflow: hidden;
  background: var(--forum-surface);
  box-shadow: var(--forum-shadow-sm);
}

.btn-view-toggle,
.view-toggle-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--forum-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-view-toggle:hover,
.view-toggle-btn:hover {
  background: color-mix(in oklab, var(--forum-accent) 10%, var(--forum-surface));
  color: var(--forum-accent);
}

.btn-view-toggle.active,
.view-toggle-btn.active {
  background: var(--forum-accent);
  color: white;
}

.btn-view-toggle:not(:last-child),
.view-toggle-btn:not(:last-child) {
  border-right: 1px solid var(--forum-border);
}

.forum-breadcrumb{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--forum-muted);
}

.forum-breadcrumb a{
  color: var(--forum-accent);
  text-decoration: none;
  transition: color .15s ease;
}

.forum-breadcrumb a:hover{
  color: var(--forum-accent-2);
}

.forum-breadcrumb .separator{
  color: var(--forum-border);
}

.thread-title{
  margin: 0 0 12px 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.thread-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  color: var(--forum-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.thread-stats{
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--forum-border);
  font-size: 13px;
  color: var(--forum-muted);
}

.thread-stat{
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- Category/Brand/Model Info --- */
.thread-category-info{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  
}

.category-badge, .brand-badge, .model-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--forum-radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.category-badge{
  background: color-mix(in oklab, var(--forum-accent) 15%, var(--forum-surface));
  color: var(--forum-accent);
}

.brand-badge{
  background: color-mix(in oklab, var(--forum-success) 15%, var(--forum-surface));
  color: var(--forum-success);
}

.model-badge{
  background: color-mix(in oklab, var(--forum-warn) 15%, var(--forum-surface));
  color: var(--forum-warn);
}

/* --- OP Post in Header --- */
.thread-op-post{
  margin-top: 10px;
  
}

.op-post-header{
  margin-bottom: 12px;
}

.op-post-header h4{
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--forum-accent);
}

.op-post-content{
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Ensure anchor jumps land below a sticky header by providing a scroll margin
   This uses a reasonable fallback (88px) but JS will update document scroll-padding-top
   dynamically on pages where the header height differs. */
article.forum-post, .forum-post {
  scroll-margin-top: calc(var(--forum-header-offset, 65px) + 8px);
}

/* Highlight posts when their anchor is present in the URL (permanent glow) */
.forum-post.post-anchor-highlight {
  position: relative;
  /* stronger outer shadow; inset glow is provided by ::after */
  box-shadow: 0 10px 48px rgba(255,122,24,0.24) !important;
  border-color: rgba(255,122,24,0.40) !important;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

/* Slightly stronger glow in dark mode */
@media (prefers-color-scheme: dark){
  .forum-post.post-anchor-highlight {
    box-shadow: 0 12px 56px rgba(255,160,80,0.26) !important;
    border-color: rgba(255,160,80,0.44) !important;
  }
}

.op-post-content p{
  margin: 0 0 12px 0;
}

.op-post-content p:last-child{
  margin-bottom: 0;
}

/* OP Vote Buttons */
.op-vote-buttons {
  margin-right: 8px;
}

.op-post-header .post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto; /* Push to the right */
  justify-content: flex-end; /* Align items to the right */
}

.op-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stronger override placed at end to ensure the anchored post glow wins over other .forum-post rules */
#main-content .forum-post.post-anchor-highlight {
  box-shadow: 0 14px 64px rgba(255,122,24,0.30) !important;
  border-color: rgba(255,122,24,0.46) !important;
}

@media (prefers-color-scheme: dark){
  #main-content .forum-post.post-anchor-highlight {
    box-shadow: 0 16px 72px rgba(255,160,80,0.32) !important;
    border-color: rgba(255,160,80,0.46) !important;
  }
}

/* Ensure an inset glow is always visible (useful when outer box-shadow is clipped or overridden) */
.forum-post.post-anchor-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 32px rgba(255,122,24,0.18), inset 0 0 8px rgba(255,122,24,0.08);
  mix-blend-mode: screen;
}

@media (prefers-color-scheme: dark){
  .forum-post.post-anchor-highlight::after {
    box-shadow: inset 0 0 40px rgba(255,160,80,0.22), inset 0 0 10px rgba(255,160,80,0.08);
  }
}

/* --- Thread Tags --- */
.thread-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 16px;
  
}

.thread-tags .tag{
  display: inline-block;
  padding: 2px 8px;
  background: var(--forum-border);
  color: var(--forum-muted);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

/* --- Author Info --- */
.author-info{
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--forum-border);
}

.author-name{
  font-weight: 600;
  color: var(--forum-text);
}

/* --- Posts List --- */
.forum-posts{
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.forum-post{
  background: var(--forum-surface);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius);
  overflow: hidden;
  box-shadow: var(--forum-shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}

.forum-post:hover{
  box-shadow: var(--forum-shadow);
}

/* --- Nested Posts Styling --- */
.post-replies {
  margin-left: clamp(16px, 3vw, 32px);  
  margin-bottom: 4px;
  position: relative;
}

.post-replies::before {
  content: '';
  position: absolute;
  left: -16px;
  top: -8px;
  bottom: 2px;
  width: 2px;
  background: linear-gradient(to bottom, var(--forum-border), transparent);
}

.post-replies[data-depth="1"]::before { background: color-mix(in oklab, var(--forum-accent) 30%, var(--forum-border)); }
.post-replies[data-depth="2"]::before { background: color-mix(in oklab, var(--forum-success) 30%, var(--forum-border)); }
.post-replies[data-depth="3"]::before { background: color-mix(in oklab, var(--forum-warn) 30%, var(--forum-border)); }
.post-replies[data-depth="4"]::before { background: color-mix(in oklab, var(--forum-danger) 30%, var(--forum-border)); }

.forum-post[data-depth="1"] { border-left: 3px solid color-mix(in oklab, var(--forum-accent) 20%, var(--forum-border)); margin-bottom: 6px; }
.forum-post[data-depth="2"] { border-left: 3px solid color-mix(in oklab, var(--forum-success) 20%, var(--forum-border)); margin-bottom: 6px; }
.forum-post[data-depth="3"] { border-left: 3px solid color-mix(in oklab, var(--forum-warn) 20%, var(--forum-border)); margin-bottom: 6px; }
.forum-post[data-depth="4"] { border-left: 3px solid color-mix(in oklab, var(--forum-danger) 20%, var(--forum-border)); margin-bottom: 6px; }
.forum-post[data-depth="5"], .forum-post[data-depth="6"], .forum-post[data-depth="7"], .forum-post[data-depth="8"] { 
  border-left: 3px solid var(--forum-muted);
}

/* Depth indicator for nested view */
.depth-indicator {
  color: var(--forum-muted);
  font-size: 12px;
  margin-left: 4px;
  font-weight: 400;
}

/* Reply indicator for flat view */
.reply-indicator {
  color: var(--forum-accent);
  font-size: 12px;
  margin-left: 8px;
  font-weight: 500;
  background: color-mix(in oklab, var(--forum-accent) 10%, var(--forum-surface));
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--forum-accent) 20%, var(--forum-border));
}

/* Reply context chip for flat view showing "↩ in reply to @name" */
.reply-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--forum-accent);
  font-size: 11px;
  font-weight: 600;
  background: color-mix(in oklab, var(--forum-accent) 8%, var(--forum-surface));
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--forum-accent) 15%, var(--forum-border));
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reply-context-chip:hover {
  background: color-mix(in oklab, var(--forum-accent) 12%, var(--forum-surface));
  border-color: var(--forum-accent);
  color: var(--forum-accent-2);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reply-context-chip .reply-link {
  margin-left: 2px;
  padding: 1px 3px;
  font-size: 10px;
  opacity: 0.8;
}

.reply-context-chip .reply-link:hover {
  opacity: 1;
}

.vote-score-display {
  font-size: clamp(18px, 1.5vw, 24px);
}


/* Branch controls for nested view collapse/expand functionality */
.branch-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 8px 0;
  padding: 0;
}

.branch-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--forum-surface);
  border: 1px solid var(--forum-border);
  border-radius: 16px;
  color: var(--forum-text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  padding: 6px 10px;
  min-height: 28px;
  font-weight: 500;
}

.branch-toggle:hover {
  background: color-mix(in oklab, var(--forum-accent) 8%, var(--forum-surface));
  border-color: var(--forum-accent);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  color: var(--forum-accent);
}

.branch-toggle.collapsed {
  background: color-mix(in oklab, var(--forum-warn) 8%, var(--forum-surface));
  border-color: var(--forum-warn);
  color: var(--forum-warn);
}

.branch-toggle.collapsed:hover {
  background: color-mix(in oklab, var(--forum-warn) 12%, var(--forum-surface));
  border-color: var(--forum-warn);
  color: var(--forum-warn);
}

.toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  border-radius: 3px;
  background: color-mix(in oklab, var(--forum-border) 30%, var(--forum-surface));
  transition: all 0.2s ease;
}

.branch-toggle:hover .toggle-icon {
  background: color-mix(in oklab, var(--forum-accent) 15%, var(--forum-surface));
  color: var(--forum-accent);
}

.branch-toggle.collapsed .toggle-icon {
  background: color-mix(in oklab, var(--forum-warn) 15%, var(--forum-surface));
  color: var(--forum-warn);
}

.reply-count {
  font-size: 11px;
  color: var(--forum-muted);
  font-weight: 600;
  white-space: nowrap;
}

.branch-toggle:hover .reply-count {
  color: var(--forum-accent);
}

.branch-toggle.collapsed:hover .reply-count {
  color: var(--forum-warn);
}

/* Disable interactions during animation */
.branch-toggle[data-animating="true"] {
  pointer-events: none;
  opacity: 0.7;
}

/* Animation styles for collapsing/expanding branches */
.post-children {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Unread post markers for posts created since last visit */
.unread-marker {
  display: inline-flex;
  align-items: center;
  color: var(--forum-surface);
  background: var(--forum-success);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.unread-post {
  position: relative;
}

.unread-post::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--forum-success);
  border-radius: 0 2px 2px 0;
  opacity: 0.8;
}

/* Reply link for jumping to parent post */
.reply-link {
  color: var(--forum-accent);
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin-left: 4px;
}

.reply-link:hover {
  background: color-mix(in oklab, var(--forum-accent) 15%, var(--forum-surface));
  color: var(--forum-accent-2);
  text-decoration: none;
}

/* Hide depth indicator in flat view and reply indicator in nested view */
.forum-post.is-reply .depth-indicator {
  display: none;
}

.forum-post:not(.is-reply) .reply-indicator {
  display: none;
}

/* Highlight animation for jumped-to posts */
.forum-post.post-jump-highlight {
  animation: post-jump-highlight 2s ease-out;
}

@keyframes post-jump-highlight {
  0% {
    background: color-mix(in oklab, var(--forum-accent) 20%, var(--forum-surface));
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--forum-accent) 30%, transparent);
    transform: scale(1.01);
  }
  50% {
    background: color-mix(in oklab, var(--forum-accent) 15%, var(--forum-surface));
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--forum-accent) 20%, transparent);
  }
  100% {
    background: var(--forum-surface);
    box-shadow: none;
    transform: scale(1);
  }
}

/* --- Inline Reply Form --- */
.inline-reply-form {
  background: var(--forum-surface);
  border: 1px solid var(--forum-accent);
  border-radius: var(--forum-radius);
  margin: 12px 0;
  padding: 16px;
  box-shadow: var(--forum-shadow-sm);
  animation: slideInUp 0.3s ease-out;
}

.inline-reply-form .reply-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.inline-reply-form h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--forum-accent);
}

.btn-close-reply {
  background: none;
  border: none;
  color: var(--forum-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.btn-close-reply:hover {
  background: var(--forum-border);
  color: var(--forum-text);
}

.inline-reply-form textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--forum-text);
  background: var(--forum-surface);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
  margin-bottom: 12px;
}

.inline-reply-form textarea:focus {
  outline: none;
  border-color: var(--forum-accent);
  box-shadow: var(--forum-focus);
}

.inline-reply-form .reply-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.btn-submit-reply {
  background: var(--forum-accent);
  color: white;
  border: 1px solid var(--forum-accent);
  border-radius: var(--forum-radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-submit-reply:hover {
  background: var(--forum-accent-2);
  border-color: var(--forum-accent-2);
  transform: translateY(-1px);
}

.btn-submit-reply:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-cancel-reply {
  background: none;
  color: var(--forum-muted);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-reply:hover {
  border-color: var(--forum-accent);
  color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
}

.post-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 10px 16px;
  border-bottom: 1px solid var(--forum-border);
  background: color-mix(in oklab, var(--forum-surface) 95%, var(--forum-border));
}

.post-author{
  display: flex;
  align-items: center;
  gap: 12px;
}

#main-content .forum-post .post-author .author-avatar {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
}

.post-author-details{
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.post-author-name{
  font-weight: 700;
  font-size: 15px;
  color: var(--forum-text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.post-author-name .author-name {
  flex-shrink: 0;
}

.post-author-name .depth-indicator {
  color: var(--forum-muted);
  font-weight: 400;
  flex-shrink: 0;
}

.post-author-name .unread-marker {
  flex-shrink: 0;
}

.post-author-meta{
  font-size: 13px;
  color: var(--forum-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-vote-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in oklab, var(--forum-border) 8%, var(--forum-surface));
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 2px;
}

.post-vote-like,
.post-vote-dislike {
  background: none !important;
  border: none !important;
  padding: 6px 8px !important;
  border-radius: calc(var(--forum-radius-sm) - 2px) !important;
  transition: all 0.2s ease !important;
  font-size: 14px;
  min-width: auto;
}

.post-vote-like:hover:not(:disabled),
.post-vote-dislike:hover:not(:disabled) {
  background: color-mix(in oklab, var(--forum-accent) 10%, var(--forum-surface)) !important;
  transform: scale(1.1);
}

.post-vote-like.voted {
  background: color-mix(in oklab, var(--forum-success) 15%, var(--forum-surface)) !important;
  color: var(--forum-success) !important;
  box-shadow: 0 0 8px color-mix(in oklab, var(--forum-success) 40%, transparent);
  border: 1px solid var(--forum-success) !important;
}

.post-vote-dislike.voted {
  background: color-mix(in oklab, var(--forum-danger) 15%, var(--forum-surface)) !important;
  color: var(--forum-danger) !important;
  box-shadow: 0 0 8px color-mix(in oklab, var(--forum-danger) 40%, transparent);
  border: 1px solid var(--forum-danger) !important;
}

div.post-vote-buttons.op-vote-buttons.thread-vote-buttons div.thread-vote-buttons span.post-vote-score {
  font-weight: 700;
  font-size: 24px !important;
  padding: 0 0 0 8px;
  min-width: 30px;
  text-align: center;
}

.vote-score-display .post-vote-score {
  font-weight: 700;
  font-size: clamp(18px, 1.5vw, 24px);
  padding: 0 8px;
  min-width: 30px;
  text-align: center;
}

button.post-action-btn[data-action="edit"]{
  background-color: rgba(255, 230, 0, 0.3);
}

.post-vote-score {
  font-weight: 700;
  font-size: clamp(14px, 1.5vw, 16px);
  padding: 0 8px;
  min-width: 30px;
  text-align: center;
}

.post-vote-score.positive {
  color: var(--forum-success);
}

.post-vote-score.negative {
  color: var(--forum-danger);
}

.post-vote-score.neutral {
  color: var(--forum-muted);
}

.post-other-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-vote-like.loading,
.post-vote-dislike.loading {
  opacity: 0.7;
  pointer-events: none;
}

.post-vote-like:disabled,
.post-vote-dislike:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--forum-surface) !important;
  border-color: var(--forum-border) !important;
  color: var(--forum-muted) !important;
  transform: none !important;
}

.post-vote-like.loading::after,
.post-vote-dislike.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin-translate 1s linear infinite;
  top: 50%;
  left: 50%;
}

.post-action-btn{
  background: none;
  border: 1px solid var(--forum-border);
  color: var(--forum-muted);
  border-radius: var(--forum-radius-sm);
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s ease;
  align-items: center;
  gap: 4px;
}

.post-action-btn:hover{
  border-color: var(--forum-accent);
  color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
}

.op-edit-btn {
  display: inline-flex;
  margin-left: 8px;
  width: 36px;
  height: 36px;
}

/* Share button styling to match post-actions elements */
.btn-share.op-share-btn.desktop-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
  width: 36px;
  height: 36px;
}

.btn-share.op-share-btn.desktop-only svg {
  display: block;
}

.post-content{
  padding: 20px 16px;
  line-height: 1.6;
  color: var(--forum-text);
}

.post-content p{
  margin: 0 0 12px 0;
}

.post-content p:last-child{
  margin-bottom: 0;
}

.post-content pre{
  background: color-mix(in oklab, var(--forum-border) 30%, var(--forum-surface));
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 12px 16px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  margin: 12px 0;
}

.post-content blockquote{
  border-left: 4px solid var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 8%, var(--forum-surface));
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 0 var(--forum-radius-sm) var(--forum-radius-sm) 0;
}

/* Mobile post actions - hidden by default */
.mobile-post-actions {
  display: none;
}

/* Desktop/Mobile visibility utilities */
.desktop-only {
  display: inline-flex;
}

.mobile-only {
  display: none;
}

@media (max-width: 767px) {
  .desktop-only {
    display: none;
  }
}

/* --- Floating Reply Button --- */
.floating-reply-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--forum-primary, #007cba);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1000;
  transition: all 0.3s ease;
  animation: fadeInUp 0.3s ease;
}

.floating-reply-btn:hover {
  background: var(--forum-primary-dark, #005a8b);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-reply-btn.visible {
  display: flex;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reply Modal Overlay */
.reply-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 20px;
  box-sizing: border-box;
}

.reply-modal-overlay.visible {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.reply-modal {
  background: var(--forum-surface, #fff);
  border-radius: var(--forum-radius, 8px);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideInUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reply-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 20px;
  border-bottom: 1px solid var(--forum-border, #e0e0e0);
  margin-bottom: 20px;
}

.reply-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--forum-text-secondary, #666);
  padding: 5px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--forum-text, #333);
}

.reply-modal-content {
  padding: 0 20px 20px 20px;
}

.modal-reply-cancel {
  background: var(--forum-surface, #fff);
  border: 1px solid var(--forum-border, #e0e0e0);
  color: var(--forum-text-secondary, #666);
  padding: 10px 16px;
  border-radius: var(--forum-radius, 6px);
  cursor: pointer;
  font-size: 14px;
  margin-left: 10px;
}

.modal-reply-cancel:hover {
  background: var(--forum-background, #f8f9fa);
  color: var(--forum-text, #333);
}

/* --- Reply Form --- */
.forum-reply-form{
  background: var(--forum-surface);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius);
  padding: 20px;
  box-shadow: var(--forum-shadow);
  margin-top: 24px;
}

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

.reply-form-header h3{
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
}

.reply-form-meta{
  font-size: 14px;
  color: var(--forum-muted);
}

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

.reply-form-content label{
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
  color: var(--forum-text);
}

.reply-form-content textarea{
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--forum-text);
  background: var(--forum-surface);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.reply-form-content textarea:focus{
  outline: none;
  border-color: var(--forum-accent);
  box-shadow: var(--forum-focus);
}

/* --- Inline post edit styles --- */
.post-editing{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-editing .post-edit-textarea{
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--forum-text);
  background: var(--forum-surface);
  resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.post-editing .post-edit-textarea:focus{
  outline: none;
  border-color: var(--forum-accent);
  box-shadow: var(--forum-focus);
}

.post-edit-actions{
  display: flex;
  gap: 12px;
  align-items: center;
}

.post-edit-actions .btn-submit-edit{
  background: var(--forum-accent);
  color: white;
  border: 1px solid var(--forum-accent);
  border-radius: var(--forum-radius-sm);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .12s ease;
}

.post-edit-actions .btn-submit-edit:hover{
  background: var(--forum-accent-2);
  border-color: var(--forum-accent-2);
  transform: translateY(-1px);
}

.post-edit-actions .btn-submit-edit:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.post-edit-actions .btn-cancel-edit{
  background: none;
  color: var(--forum-text);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: all .12s ease;
}

.post-edit-actions .btn-cancel-edit:hover{
  border-color: var(--forum-accent);
  color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
}

@media (max-width: 480px){
  .post-edit-actions{
    flex-direction: column-reverse;
    gap: 8px;
  }
}

/* --- Inline edit warning for regular users --- */
.post-edit-warning{
  margin-top: 8px;
  padding: 8px 12px;
  background: color-mix(in oklab, var(--forum-warn) 8%, var(--forum-surface));
  color: var(--forum-warn);
  border: 1px solid color-mix(in oklab, var(--forum-warn) 20%, var(--forum-border));
  border-radius: var(--forum-radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.thread-edited-badge{
  font-size: 11px;
  color: var(--forum-muted);
  margin-left: 2px;
  font-weight: 600;
  background: color-mix(in oklab, var(--forum-border) 15%, var(--forum-surface));
  padding: 0px 6px;
  border-radius: 8px;
  border: 1px solid var(--forum-border);
}

/* --- Tweaks: textarea/button sizing to better match theme --- */
.post-editing .post-edit-textarea{
  padding: 14px 18px; /* slightly roomier */
  min-height: 140px; /* taller editing area */
  font-size: 15px; /* slightly larger for readability */
}

.post-edit-actions .btn-submit-edit{
  padding: 12px 18px; /* slightly bigger click target */
  font-size: 14px;
}

.post-edit-actions .btn-cancel-edit{
  padding: 10px 14px;
  font-size: 14px;
}

/* --- Highlight animation for edited posts (use by adding class to .forum-post) --- */
.forum-post.post-edit-highlight{
  animation: post-edit-highlight 1.2s ease forwards;
}

@keyframes post-edit-highlight{
  0%{
    background-color: rgba(255, 249, 196, 0.95);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
  }
  60%{
    background-color: rgba(255, 249, 196, 0.45);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.06);
    transform: translateY(-1px);
  }
  100%{
    background-color: transparent;
    box-shadow: none;
    transform: translateY(0);
  }
}

.inline-reply-submit{
  background: var(--forum-accent);
  color: white;
  border: 1px solid var(--forum-accent);
  border-radius: var(--forum-radius-sm);
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-reply-submit:hover{
  background: var(--forum-accent-2);
  border-color: var(--forum-accent-2);
  transform: translateY(-1px);
}

.inline-reply-cancel {
  background: none;
  color: var(--forum-muted);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.inline-reply-cancel:hover {
  border-color: var(--forum-accent);
  color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
}

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

.reply-form-actions .btn-submit{
  background: var(--forum-accent);
  color: white;
  border: 1px solid var(--forum-accent);
  border-radius: var(--forum-radius-sm);
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-form-actions .btn-submit:hover{
  background: var(--forum-accent-2);
  border-color: var(--forum-accent-2);
  transform: translateY(-1px);
}

.reply-form-actions .btn-submit:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.reply-form-actions .form-note{
  font-size: 13px;
  color: var(--forum-muted);
}

/* --- Pagination for posts --- */
.forum-post-pagination{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  background: var(--forum-surface);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius);
  box-shadow: var(--forum-shadow-sm);
}

/* Server-side rendered pagination */
.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pagination-info {
  font-size: 14px;
  color: var(--forum-muted);
}

.pagination-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-link {
  border: 1px solid var(--forum-border);
  background: var(--forum-surface);
  color: var(--forum-text);
  border-radius: var(--forum-radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
}

.pagination-link:hover {
  border-color: var(--forum-accent);
  color: var(--forum-accent);
  text-decoration: none;
}

.pagination-link.current {
  background: var(--forum-accent);
  color: white;
  border-color: var(--forum-accent);
}

.pagination-link.first,
.pagination-link.last {
  font-weight: 700;
}

/* Legacy button support for JavaScript fallback */
.forum-post-pagination button{
  border: 1px solid var(--forum-border);
  background: var(--forum-surface);
  color: var(--forum-text);
  border-radius: var(--forum-radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.forum-post-pagination button:hover:not(:disabled){
  border-color: var(--forum-accent);
  color: var(--forum-accent);
}

.forum-post-pagination button:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}

.forum-post-pagination .page-info{
  font-size: 14px;
  color: var(--forum-muted);
  margin: 0 8px;
}

/* --- Status badges --- */
.status-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* OP Badge - Default styling for thread author */
.post-author-name .status-badge {
  background: color-mix(in oklab, var(--forum-accent) 15%, var(--forum-surface));
  color: var(--forum-accent);
  border: 1px solid color-mix(in oklab, var(--forum-accent) 25%, var(--forum-surface));
}

.status-badge.locked{
  background: color-mix(in oklab, var(--forum-danger) 15%, var(--forum-surface));
  color: var(--forum-danger);
}

.status-badge.sticky{
  background: color-mix(in oklab, var(--forum-warn) 15%, var(--forum-surface));
  color: var(--forum-warn);
}

.status-badge.solved{
  background: color-mix(in oklab, var(--forum-success) 15%, var(--forum-surface));
  color: var(--forum-success);
}

.status-badge.closed{
  background: color-mix(in oklab, var(--forum-danger) 15%, var(--forum-surface));
  color: var(--forum-danger);
}

.status-badge.pending-approval{
  background: rgba(251, 191, 36, 0.95);
  color: #78350f;
  border: 1px solid rgba(217, 119, 6, 0.5);
  backdrop-filter: blur(8px);
}

.status-badge.hidden{
  background: color-mix(in oklab, var(--forum-muted) 15%, var(--forum-surface));
  color: var(--forum-muted);
  opacity: 0.7;
}

/* --- Login Prompt --- */
.forum-login-prompt {
  background: var(--forum-surface);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius);
  padding: 24px;
  text-align: center;
  margin-top: 24px;
  box-shadow: var(--forum-shadow);
}

.login-prompt-content h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--forum-text);
}

.login-prompt-content p {
  margin: 0 0 20px 0;
  color: var(--forum-muted);
  line-height: 1.5;
}

.btn-login, 
.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: var(--forum-radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: all .15s ease;
  margin: 0 8px;
}

.btn-login {
  background: var(--forum-accent);
  color: white;
  border: 1px solid var(--forum-accent);
}

.btn-login:hover {
  background: var(--forum-accent-2);
  border-color: var(--forum-accent-2);
  transform: translateY(-1px);
}

.btn-register {
  background: var(--forum-surface);
  color: var(--forum-accent);
  border: 1px solid var(--forum-border);
}

.btn-register:hover {
  border-color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
}

.login-separator {
  display: inline-block;
  margin: 0 12px;
  color: var(--forum-muted);
  font-size: 14px;
}

/* --- Forum Navigation --- */
.forum-navigation {
  margin-top: 32px;
  text-align: center;
}

.btn-back-to-forum {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--forum-surface);
  color: var(--forum-accent);
  border: 1px solid var(--forum-border);
  border-radius: var(--forum-radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: all .15s ease;
  box-shadow: var(--forum-shadow-sm);
}

.btn-back-to-forum:hover {
  border-color: var(--forum-accent);
  background: color-mix(in oklab, var(--forum-accent) 5%, var(--forum-surface));
  transform: translateY(-1px);
}

/* --- Thread Stats Vote Score --- */
.thread-vote-score.positive {
  color: #16a34a;
  font-weight: 600;
}

.thread-vote-score.negative {
  color: #dc2626;
  font-weight: 600;
}

.thread-vote-score.neutral {
  color: var(--forum-muted);
  font-weight: 500;
}

.thread-vote-details {
  font-size: 0.9em;
  color: var(--forum-muted);
  margin-left: 4px;
}

/* --- Loading states --- */
.forum-loading{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--forum-muted);
}

.forum-error{
  background: color-mix(in oklab, var(--forum-danger) 10%, var(--forum-surface));
  border: 1px solid color-mix(in oklab, var(--forum-danger) 30%, var(--forum-border));
  border-radius: var(--forum-radius);
  padding: 20px;
  text-align: center;
  color: var(--forum-danger);
  margin: 20px 0;
}

.forum-error button{
  background: var(--forum-danger);
  color: white;
  border: none;
  border-radius: var(--forum-radius-sm);
  padding: 8px 16px;
  margin-top: 12px;
  cursor: pointer;
  transition: opacity .15s ease;
}

.forum-error button:hover{
  opacity: 0.9;
}

/* --- Responsive design --- */
@media (max-width: 768px){
  /* Thread header improvements for tablet */
  .thread-header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .thread-title {
    font-size: clamp(20px, 4vw, 28px);
    line-height: 1.3;
    margin-bottom: 8px;
  }
  
  .thread-status-controls {
    width: 100%;
  }
  
  .admin-status-controls .status-input-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .status-select {
    width: 100%;
  }
  
  .btn-change-status {
    width: 100%;
    justify-content: center;
  }
  
  /* Post header for tablet */
  .post-header{
    /* align-items: flex-start; */
    gap: 12px;
  }

  .op-edit-btn {
    width: 36px;
    height: 36px;
    margin-left: 0;
  }
  
  /* Reduce nesting indentation on mobile */
  .post-replies {
    margin-left: clamp(12px, 2vw, 20px);
    margin-top: 6px;
    margin-bottom: 6px;
  }
  
  .post-replies::before {
    left: -12px;
    top: 0;
    bottom: 6px;
  }
  
  .inline-reply-form {
    padding: 12px;
  }
  
  .inline-reply-form .reply-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-submit-reply,
  .btn-cancel-reply {
    width: 100%;
    justify-content: center;
  }
  
  .thread-meta,
  .thread-stats{
    flex-direction: wrap;
    align-items: flex-start;
    gap: 8px;
  }
  
  .reply-form-actions{
    flex-direction: column;
    align-items: stretch;
  }
  
  .forum-post-pagination{
    flex-direction: column;
    gap: 8px;
  }

  /* Additional responsive adjustments from page-specific CSS */
  .thread-header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .thread-status-controls {
    align-self: flex-end;
  }
  
  .op-status-controls .btn-thread-status {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .admin-status-controls {
    min-width: auto;
    width: 100%;
  }
  
  .status-input-group {
    flex-direction: column;
    gap: 8px;
  }
  
  .status-select,
  .btn-change-status {
    width: 100%;
  }
  
  .btn-login, 
  .btn-register {
    display: block;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
  }
  
  .login-separator {
    display: block;
    margin: 12px 0;
  }
  
  .post-vote-buttons {
    gap: 2px;
    margin-right: 4px;
    height: 36px;
  }
  
  .post-vote-like,
  .post-vote-dislike {
    min-width: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }
  
  .post-vote-score {
    padding: 3px 6px;
    font-size: 11px;
    min-width: 30px;
  }
  
  /* Floating reply button adjustments for mobile */
  .floating-reply-btn {
    bottom: 15px;
    right: 15px;
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  
  .reply-modal {
    margin: 10px;
    max-height: 90vh;
  }

  /* Login prompt adjustments for mobile */
  .login-prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
}

/* Extra small devices (very small phones) */
@media (max-width: 375px) {
  #forum-app.forum-container {
    padding: 8px;
  }
  
  /* Even more compact post-header for tiny screens */
  .post-header {
    padding: 10px 12px;
    gap: 10px;
  }
  
  .post-author {
    gap: 8px;
  }
  
  .post-author .author-avatar {
    width: 36px !important;
    height: 36px !important;
  }
  
  .post-author-name {
    font-size: 13px;
  }
  
  .post-author-meta {
    font-size: 11px;
  }
  
  /* Even more compact mobile actions for tiny screens */
  .mobile-vote-group {
    padding: 1px;
  }
  
  .mobile-vote-like,
  .mobile-vote-dislike {
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
  }
  
  .mobile-vote-score {
    font-size: 11px;
    padding: 0 8px;
    min-width: 32px;
  }
  
  .mobile-action-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 6px;
    font-size: 13px;
  }
  
  /* Compact vote buttons for tiny screens */
  .post-vote-buttons {
    gap: 6px;
  }
  
  .post-vote-like,
  .post-vote-dislike {
    min-width: 40px !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
  }
  
  .post-vote-score {
    min-width: 36px;
    padding: 6px 8px;
    font-size: 11px;
  }
  
  /* Even smaller action buttons */
  .post-action-btn {
    padding: 5px 8px;
    font-size: 10px;
    min-height: 28px;
  }
  
  /* Adjust content padding */
  .post-content {
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
  }
  
  /* Very compact nesting */
  .post-replies {
    margin-left: 6px;
  }
  
  .post-replies::before {
    left: -6px;
    width: 1px;
  }
  
  /* Smaller floating button for tiny screens */
  .floating-reply-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: 12px;
    right: 12px;
  }
  
  /* More compact modal for tiny screens */
  .reply-modal {
    margin: 5px;
    max-height: 95vh;
  }
  
  .reply-modal-header {
    padding: 15px 15px 0 15px;
  }
  
  .reply-modal-content {
    padding: 0 15px 15px 15px;
  }
}

@media (max-width: 480px){
  #forum-app.forum-container{
    padding: 12px;
  }
  
  /* Thread header mobile improvements */
  .forum-thread-header {
    padding: 16px;
  }
  
  .thread-title {
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.2;
    margin-bottom: 12px;
  }
  
  .thread-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .author-info {
    gap: 8px;
  }
  
  #main-content .forum-thread-header .author-avatar {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }
  
  .author-name {
    font-size: 14px;
  }
  
  .thread-stats {
    flex-direction: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
  }
  
  .thread-stat {
    font-size: 12px;
  }
  
  /* OP post improvements */
  .thread-op-post {
    margin-top: 12px;
  }
  
  .op-post-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  
  .op-post-header .post-actions {
    justify-content: flex-end;
    margin-left: auto;
    flex-shrink: 0;
  }
  
  .op-vote-buttons {
    margin-right: 0;
  }
  
  .forum-thread-header,
  .forum-reply-form{
    padding: 16px;
  }

  .forum-post{
    padding: 6px 0 3px 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0) 100%);
  }
  
  /* MAJOR REDESIGN: Move post actions below content */
  .post-header{
    padding: 2px 6px;
    min-height: 28px;
    border-bottom: none;
    background: transparent;
    /* Keep header simple - just author info */
  }
  
  /* Post author section - horizontal on mobile but with better spacing */
  .post-author {
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    padding: 0 6px 3px 3px;
  }
  
  #main-content .forum-post .post-author .author-avatar {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
  }
  
  .post-author-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  
  .post-author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0; /* important for flex truncation */
    font-size: 12px;
    line-height: 1.2;
  }
  
   .post-author-name .author-name {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .post-author-meta {
    flex: 0 0 auto;
    margin-left: 8px;
    white-space: nowrap;
    color: var(--forum-muted);
    font-size: 10px;
  }

  /* Depth indicator / tiny badges shouldn't shrink */
  .post-author-name .depth-indicator,
  .post-author-name .unread-marker,
  .post-author-name .status-badge {
    flex-shrink: 0;
    margin-left: 6px;
  }
  
  /* Hide post actions from header - they'll be moved below content */
  .post-header .post-actions {
    display: none;
  }
  
  /* Show mobile post actions */
  .mobile-post-actions {
    display: flex;
  }
  
  /* New post footer for actions below content */
  .post-content {
    padding: 16px;
    padding-bottom: 8px; /* Reduce bottom padding since we're adding footer */
  }
  
  /* Add post actions after content */
  .forum-post {
    position: relative;
  }
  
  /* Create a new mobile post actions container */
  .mobile-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 2px 0 3px;
    background: var(--forum-surface);
  }
  
  /* Compact vote buttons - single grouped design */
  .mobile-vote-group {
    display: flex;
    align-items: center;
    background: color-mix(in oklab, var(--forum-border) 3%, var(--forum-surface));
    border-radius: var(--forum-radius-sm);
    padding: 2px;
    gap: 0;
  }
  
  .mobile-vote-like,
  .mobile-vote-dislike {
    background: none !important;
    border: none !important;
    padding: 8px 10px !important;
    color: var(--forum-muted) !important;
    font-size: 16px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--forum-radius-sm) !important;
    transition: all 0.2s ease !important;
  }
  
  .mobile-vote-like:hover:not(:disabled),
  .mobile-vote-dislike:hover:not(:disabled) {
    background: color-mix(in oklab, var(--forum-accent) 10%, var(--forum-surface)) !important;
    color: var(--forum-accent) !important;
  }
  
  .mobile-vote-like.voted {
    background: color-mix(in oklab, var(--forum-success) 15%, var(--forum-surface)) !important;
    color: var(--forum-success) !important;
  }
  
  .mobile-vote-dislike.voted {
    background: color-mix(in oklab, var(--forum-danger) 15%, var(--forum-surface)) !important;
    color: var(--forum-danger) !important;
  }
  
  .mobile-vote-score {
    font-weight: 600;
    font-size: 13px;
    color: var(--forum-text);
    padding: 0 12px;
    min-width: 40px;
    text-align: center;
    border-left: 1px solid var(--forum-border);
    border-right: 1px solid var(--forum-border);
  }
  
  .mobile-vote-score.positive {
    color: var(--forum-success);
  }
  
  .mobile-vote-score.negative {
    color: var(--forum-danger);
  }
  
  /* Compact action buttons - icons only */
  .mobile-action-group {
    display: flex;
    gap: 8px;
  }
  
  .mobile-action-btn {
    background: none;
    border: none;
    color: var(--forum-muted);
    padding: 0px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--forum-radius-sm);
  }
  
  .mobile-action-btn:hover {
    color: var(--forum-accent);
    background: color-mix(in oklab, var(--forum-accent) 10%, var(--forum-surface));
  }

  .mobile-action-btn svg,
  .mobile-action-btn svg * {
    pointer-events: none;
    display: block;
  }
/* Optional: ensure button has full hit area */
.mobile-action-btn {
  position: relative;
  z-index: 2;
  /* ensure clickable area covers visual region */
  padding: 6px;
  min-width: 36px;
  min-height: 36px;
  box-sizing: border-box;
}
  
  /* Hide text in action buttons on mobile */
  .mobile-action-btn .btn-text {
    display: none;
  }
  
  
  /* Further reduce nesting on small screens */
  .post-replies {
    margin-left: 8px;
    margin-top: 4px;
    margin-bottom: 4px;
  }
  
  .post-replies::before {
    left: -8px;
    top: 0;
    bottom: 4px;
  }
  
  /* Mobile adjustments for reply context chip */
  .reply-context-chip {
    font-size: 10px;
    padding: 3px 6px;
  }

  /* Additional mobile adjustments from page-specific CSS */
  .thread-header-top {
    gap: 8px;
  }
  
  .op-status-controls .btn-thread-status {
    width: 100%;
    justify-content: center;
  }
  
  .admin-status-controls .status-control-group {
    width: 100%;
  }
  
  .forum-thread-header,
  .forum-reply-form,
  .forum-login-prompt {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  /* Reply form mobile improvements */
  .reply-form-content textarea {
    min-height: 100px;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .reply-form-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
  
  /* Pagination mobile improvements */
  .pagination-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .pagination-links {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  
  .pagination-link {
    min-width: 36px;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 14px;
  }
  
  /* Branch controls mobile improvements */
  .branch-toggle {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 24px;
  }
  
  .toggle-icon {
    width: 14px;
    height: 14px;
    font-size: 12px;
  }
  
  /* View controls mobile improvements */
  .forum-view-controls {
    margin: 12px 0;
    justify-content: center;
  }
  
  .view-toggle-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* --- Utility classes --- */
.hidden{
  display: none !important;
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Animation for new posts --- */
@keyframes slideInUp{
  from{
    opacity: 0;
    transform: translateY(20px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Alternative spin animation for loading states with translate offset */
@keyframes spin-translate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.forum-post.new-post{
  animation: slideInUp 0.3s ease-out;
}

/* --- Focus styles --- */
*:focus-visible{
  outline: 2px solid var(--forum-accent);
  outline-offset: 2px;
}

/* --- Links in posts --- */
.post-content a{
  color: var(--forum-accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--forum-accent) 40%, transparent);
  text-underline-offset: 2px;
  transition: all .15s ease;
}

.post-content a:hover{
  color: var(--forum-accent-2);
  text-decoration-color: var(--forum-accent-2);
}

/* --- Mobile Bottom Reply Bar --- */
.mobile-bottom-reply-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--forum-bg);
    border-top: 1px solid var(--forum-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 12px 16px;
    display: none; /* Hidden by default, shown only on mobile when logged in */
    transition: all 0.3s ease-in-out;
}

.mobile-bottom-reply-bar.visible {
    display: flex;
}

.mobile-bottom-reply-bar.expanded {
    height: 50vh;
    flex-direction: column;
    padding: 16px;
}

.mobile-bottom-reply-content {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    transition: all 0.3s ease-in-out;
}

.mobile-bottom-reply-bar.expanded .mobile-bottom-reply-content {
    height: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
}

.mobile-reply-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--forum-accent);
    transition: all 0.3s ease;
}

.mobile-bottom-reply-bar.expanded .mobile-reply-icon {
    align-self: flex-start;
}

.mobile-reply-textarea {
    flex: 1;
    border: 1px solid var(--forum-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    background: var(--forum-input-bg);
    color: var(--forum-text);
    resize: none;
    width: 256px;
    height: 36px;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.mobile-reply-textarea:focus {
    outline: none;
    border-color: var(--forum-accent);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--forum-accent) 20%, transparent);
}

.mobile-bottom-reply-bar.expanded .mobile-reply-textarea {
    height: 100%;
    overflow-y: auto;
    font-size: 16px; /* Prevent zoom on iOS */
}

.mobile-reply-send-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--forum-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-reply-send-btn:hover {
    background: color-mix(in oklab, var(--forum-accent) 90%, black);
    transform: translateY(-1px);
}

.mobile-reply-send-btn:active {
    transform: translateY(0);
}

.mobile-reply-send-btn:disabled {
    background: var(--forum-border);
    color: var(--forum-text-muted);
    cursor: not-allowed;
    transform: none;
}

.mobile-bottom-reply-bar.expanded .mobile-reply-send-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-reply-send-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Loading state for send button */
.mobile-reply-send-btn.loading .mobile-reply-send-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile-only visibility */
@media (max-width: 768px) {
    .mobile-bottom-reply-bar.visible {
        display: flex;
        width: 100%;
    }
    
    /* Hide regular reply form on mobile when bottom bar is visible */
    .mobile-bottom-reply-bar.visible ~ .forum-reply-form {
        display: none;
    }
    
    /* Adjust body padding to account for bottom bar */
    body.has-mobile-reply-bar {
        padding-bottom: 64px;
    }
    
    body.has-mobile-reply-bar.mobile-reply-expanded {
        padding-bottom: 50vh;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-reply-bar {
        display: none !important;
    }
}

/* ===========================
   Thread Image Gallery
   =========================== */

.thread-image-gallery {
    margin: 20px 0;
    width: 100%;
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.gallery-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    aspect-ratio: 16 / 9;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

.gallery-nav svg {
    width: 24px;
    height: 24px;
    stroke: #333;
}

/* Indicators (Dots) */
.gallery-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.gallery-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.gallery-indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 5px;
}

/* Counter */
.gallery-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* Image Status Badge (for pending images) */
.image-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.image-status-badge.pending {
    background: rgba(251, 191, 36, 0.95);
    color: #78350f;
    border: 1px solid rgba(217, 119, 6, 0.5);
}

@media (prefers-color-scheme: dark) {
    .image-status-badge.pending {
        background: rgba(120, 53, 15, 0.95);
        color: #fef3c7;
        border-color: rgba(251, 191, 36, 0.5);
    }
    
    .status-badge.pending-approval {
        background: rgba(120, 53, 15, 0.95);
        color: #fef3c7;
        border-color: rgba(251, 191, 36, 0.5);
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .gallery-container {
        border-radius: 0;
        max-width: 100%;
    }

    .gallery-slide {
        aspect-ratio: 4 / 3;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
    }

    .gallery-nav svg {
        width: 20px;
        height: 20px;
    }

    .gallery-prev {
        left: 8px;
    }

    .gallery-next {
        right: 8px;
    }

    .gallery-counter {
        top: 8px;
        right: 8px;
        font-size: 12px;
        padding: 4px 10px;
    }

    .gallery-indicators {
        bottom: 12px;
        gap: 6px;
    }

    .gallery-indicator {
        width: 8px;
        height: 8px;
    }

    .gallery-indicator.active {
        width: 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .gallery-slide {
        aspect-ratio: 1 / 1;
    }

    .gallery-nav {
        width: 32px;
        height: 32px;
        opacity: 0.9;
    }

    .gallery-nav svg {
        width: 18px;
        height: 18px;
    }
}

/* Accessibility */
.gallery-nav:focus-visible,
.gallery-indicator:focus-visible {
    outline: 2px solid var(--forum-accent, #007bff);
    outline-offset: 2px;
}

/* Loading state for lazy images */
.gallery-image[loading="lazy"] {
    background: rgba(255, 255, 255, 0.05);
}
