/* Compact Theme - Minimal spacing */
[data-theme="compact"] {
  /* Inherit Dark Theme Colors but darker/flatter */
  --bg-body: #000000;
  --bg-surface: #0a0a0a;
  --bg-surface-glass: rgba(10, 10, 10, 0.95);
  --bg-card: #111111;
  --bg-card-glass: #111111;

  --text-main: #e5e5e5;
  --text-muted: #888888;
  --text-dim: #444444;

  --primary: #3B82F6;
  --primary-glow: rgba(59, 130, 246, 0.2);
  --accent: #8B5CF6;
  --accent-glow: rgba(139, 92, 246, 0.2);
  --danger: #EF4444;

  --border-light: #222222;
  --border-hover: #333333;

  --shadow-sm: none;
  --shadow-lg: none;
  --shadow-glow: none;

  /* Compact Layout Overrides */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-xl: 4px;

  --header-height: 36px;
  --max-width: 100%;
}

[data-theme="compact"] body {
  background-image: none;
  font-size: 13px;
}

/* Global Layout Spacing */
[data-theme="compact"] .page-container {
  max-width: 100%;
  padding: 0 4px;
}

[data-theme="compact"] .masthead {
  margin-bottom: 4px;
  padding: 0 4px;
  min-height: var(--header-height);
  height: auto;
}

[data-theme="compact"] .masthead-content {
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ... existing styles ... */

/* Thread Grid - Mobile */
@media (max-width: 640px) {
  [data-theme="compact"] .thread-grid {
    grid-template-columns: 1fr;
  }
}

[data-theme="compact"] .logo {
  font-size: 1rem;
  gap: 0.25rem;
}

[data-theme="compact"] .logo img {
  width: 24px;
  height: 24px;
}

/* Cards & Content */
[data-theme="compact"] .card {
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 4px;
}

[data-theme="compact"] h1, 
[data-theme="compact"] h2, 
[data-theme="compact"] h3 {
  letter-spacing: 0;
}

[data-theme="compact"] h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

/* Forms */
[data-theme="compact"] .form-group {
  margin-bottom: 4px;
}

[data-theme="compact"] .form-label {
  font-size: 0.75rem;
  margin-bottom: 1px;
  display: inline-block;
}

[data-theme="compact"] .form-control {
  padding: 2px 6px;
  font-size: 0.85rem;
  height: auto;
  min-height: unset;
}

[data-theme="compact"] textarea.form-control {
  min-height: 60px;
}

[data-theme="compact"] .btn {
  padding: 2px 8px;
  font-size: 0.8rem;
  height: 24px;
  border-radius: var(--radius-sm);
}

[data-theme="compact"] .actions-bar,
[data-theme="compact"] .mt-4 {
  margin-top: 4px;
}

[data-theme="compact"] .mb-4 {
  margin-bottom: 4px;
}

/* Thread Grid */
[data-theme="compact"] .thread-grid {
  gap: 4px;
  margin-top: 4px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

[data-theme="compact"] .thread-image {
  height: 100px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
}

[data-theme="compact"] .thread-meta {
  margin-bottom: 2px;
  font-size: 0.7rem;
}

[data-theme="compact"] .thread-title {
  font-size: 0.9rem;
  margin-bottom: 2px;
  line-height: 1.2;
}

[data-theme="compact"] .thread-preview {
  font-size: 0.8rem;
  margin-bottom: 4px;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  line-height: 1.3;
}

[data-theme="compact"] .thread-card-actions {
  padding-top: 2px;
  margin-top: 0;
  border-top: 1px solid var(--border-light);
}

[data-theme="compact"] .cluster {
  gap: 4px;
}

/* Thread Detail View */
[data-theme="compact"] .thread-detail {
  max-width: 100%;
}

[data-theme="compact"] .post-full-image {
  margin: 4px 0;
  border-radius: var(--radius-sm);
  max-height: 400px;
  object-fit: contain;
}

[data-theme="compact"] .thread-message-large {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Replies */
[data-theme="compact"] .replies-list {
  gap: 2px;
  margin-top: 4px;
}

[data-theme="compact"] .reply-card {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

[data-theme="compact"] .reply-header {
  margin-bottom: 2px;
  font-size: 0.75rem;
}

[data-theme="compact"] .reply-message {
  font-size: 0.85rem;
  line-height: 1.3;
}

[data-theme="compact"] .reply-footer {
  margin-top: 4px;
  padding-top: 2px;
  font-size: 0.7rem;
}

[data-theme="compact"] .footer {
  margin-top: 1rem;
  padding-bottom: 1rem;
  font-size: 0.75rem;
}

/* Hide some decorative elements */
[data-theme="compact"] .text-muted small {
  display: none; /* Hide helpers like "Max 20MB" to save space */
}

[data-theme="compact"] .btn-ghost {
  padding: 0 4px;
}
