/* =============================================
   GDSJ 關渡水京社區 — 明亮社區風主題
   ============================================= */

/* --- CSS Variables --- */
:root {
  /* Primary palette */
  --primary: #2E7D6F;
  --primary-light: #E0F2EE;
  --primary-dark: #1B5E50;
  --secondary: #F5A623;
  --secondary-light: #FFF3E0;

  /* Backgrounds */
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F0F4F3;
  --bg-hover: #E8F5E9;
  --bg-code: #F5F5F5;

  /* Text */
  --text-primary: #1A1A1A;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --text-heading: #111827;

  /* Borders */
  --border-primary: #E5E7EB;
  --border-secondary: #D1D5DB;
  --border-dark: #9CA3AF;

  /* Accents */
  --accent-color: #2E7D6F;
  --link-color: #2E7D6F;
  --link-hover: #1B5E50;

  /* Status */
  --success-bg: #D1FAE5;
  --success-text: #065F46;
  --warning-bg: #FEF3C7;
  --warning-border: #F59E0B;
  --warning-text: #92400E;
  --error-bg: #FEE2E2;
  --error-text: #991B1B;
  --info-bg: #DBEAFE;
  --info-text: #1E40AF;

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", monospace;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --line-height: 1.6;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg-primary: #111827;
  --bg-secondary: #1F2937;
  --bg-tertiary: #374151;
  --bg-hover: #374151;
  --bg-code: #1F2937;

  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-heading: #F9FAFB;

  --border-primary: #374151;
  --border-secondary: #4B5563;
  --border-dark: #6B7280;

  --primary-light: #1B3A35;
  --secondary-light: #3D2E10;
  --link-color: #6EE7B7;
  --link-hover: #A7F3D0;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

/* --- Large Font Mode --- */
[data-font="large"] {
  --font-size-base: 20px;
  --font-size-lg: 24px;
  --line-height: 1.8;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

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

/* --- Header --- */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
}
.header-logo:hover { text-decoration: none; color: var(--text-heading); }

.header-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}

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

/* --- Toggle Buttons (Theme + Font Size) --- */
.toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* --- Layout --- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
  padding: 24px;
  min-height: calc(100vh - var(--header-height));
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

.sidebar-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 16px 16px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  list-style: none;
  padding: 0 8px 8px;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.15s;
}
.sidebar-nav li a:hover {
  background: var(--bg-hover);
  text-decoration: none;
}
.sidebar-nav li a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-nav .nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.sidebar-nav .nav-badge {
  margin-left: auto;
  background: var(--secondary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

/* --- Main Content --- */
.main-content {
  min-width: 0;
}

/* --- Card --- */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
}

.card-body {
  padding: 20px;
}

/* --- Board Banner --- */
.board-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 32px 24px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.board-banner h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.board-banner p {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--link-color); }
.breadcrumb .sep { color: var(--text-muted); }

/* --- Thread List --- */
.thread-list {
  list-style: none;
}

.thread-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
  transition: background 0.15s;
}
.thread-item:last-child { border-bottom: none; }
.thread-item:hover { background: var(--bg-hover); }

.thread-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}
.thread-title a {
  color: inherit;
}
.thread-title a:hover {
  color: var(--primary);
  text-decoration: none;
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.thread-meta .tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
}

/* --- Sort Tabs --- */
.sort-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
}

.sort-tab {
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.15s;
}
.sort-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.sort-tab.active {
  background: var(--primary);
  color: white;
}

/* --- Post / Reply --- */
.post-card {
  padding: 20px;
  border-bottom: 1px solid var(--border-primary);
}
.post-card:last-child { border-bottom: none; }

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.post-author {
  font-weight: 600;
  color: var(--primary);
}

.post-id {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.post-time {
  color: var(--text-muted);
}

.post-content {
  color: var(--text-primary);
  line-height: var(--line-height);
  word-wrap: break-word;
}

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

.post-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.85rem;
}

.post-action-btn {
  background: none;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: all 0.15s;
}
.post-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

/* --- Post Form --- */
.post-form {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 111, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-warning {
  background: var(--secondary);
  color: white;
}

/* --- FAQ Page --- */
.faq-section {
  margin-bottom: 24px;
}

.faq-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--primary-light);
  border-bottom: 2px solid var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.faq-category-icon {
  font-size: 1.3rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-primary);
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-heading);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: background 0.15s;
}
.faq-question:hover { background: var(--bg-hover); }

.faq-question .arrow {
  transition: transform 0.2s;
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px;
  color: var(--text-secondary);
  line-height: var(--line-height);
}
.faq-item.open .faq-answer {
  display: block;
}

.faq-important {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning-border);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--warning-text);
}

/* --- Search --- */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.search-bar .form-input {
  flex: 1;
}

.search-result-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
}
.search-result-item:last-child { border-bottom: none; }

.search-highlight {
  background: var(--secondary-light);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
}

.page-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}
.page-btn:hover { background: var(--bg-hover); }
.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Toast / Notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.toast-success { background: var(--primary); }
.toast-error { background: #EF4444; }

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

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.modal-body { padding: 20px; }

/* --- Welcome Banner (Homepage) --- */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary), #3A9D8F);
  color: white;
  border-radius: var(--radius);
  padding: 40px 32px;
  margin-bottom: 24px;
  text-align: center;
}

.welcome-banner h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.welcome-banner p {
  opacity: 0.9;
  font-size: 1rem;
}

/* --- Board Grid (Homepage) --- */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.board-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  display: block;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.board-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
}

.board-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.board-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-heading);
}

.board-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* --- Announcement Badge --- */
.badge-admin {
  background: var(--secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-primary);
  margin-top: 40px;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: all 0.2s;
}
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }
.back-to-top.visible { display: flex; }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.95rem; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 8px;
    gap: 8px;
    padding-bottom: 100px; /* space for bottom nav */
    min-height: calc(100vh - 48px); /* push content above bottom nav */
  }

  .sidebar { display: none; }

  /* Header: only logo + auth */
  .header {
    padding: 0 12px;
    height: 48px;
    min-height: 48px;
  }
  .header-logo { font-size: 0.95rem; gap: 8px; }
  .header-logo .logo-icon { width: 28px; height: 28px; font-size: 0.7rem; }
  .header-actions .toggle-btn.mobile-hide { display: none; }
  .header-actions { gap: 6px; }
  .header-actions .toggle-btn {
    padding: 4px 8px; font-size: 0.75rem; white-space: nowrap;
  }
  .mobile-menu-btn { display: none !important; }

  /* Welcome banner compact */
  .welcome-banner { padding: 20px 16px; margin-bottom: 8px; }
  .welcome-banner h1 { font-size: 1.2rem; }
  .welcome-banner p { font-size: 0.85rem; }

  /* Board grid: 2 columns compact */
  .board-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .board-card {
    padding: 12px;
  }
  .board-card-icon { font-size: 1.5rem; margin-bottom: 4px; }
  .board-card h3 { font-size: 0.9rem; }
  .board-card p { font-size: 0.75rem; }

  /* Cards compact */
  .card { border-radius: var(--radius-sm); }
  .post-form { padding: 12px; }
  .post-card { padding: 12px; }
  .card-body { padding: 12px; }
  .card-header { padding: 12px 16px; }
  .thread-meta { flex-wrap: wrap; gap: 6px; font-size: 0.75rem; }
  .thread-item { padding: 12px 16px; }
  .thread-title { font-size: 0.95rem; }

  /* Board banner compact */
  .board-banner { padding: 20px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; }
  .board-banner h1 { font-size: 1.1rem; }

  /* Breadcrumb */
  .breadcrumb { margin-bottom: 8px; font-size: 0.8rem; }

  /* Footer: add space for bottom nav */
  .footer { padding-bottom: 16px; margin-bottom: 0; }

  /* Back to top: move above bottom nav */
  .back-to-top { bottom: 80px; }
}

/* --- Bottom Navigation (Mobile) --- */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding-left: 4px;
    padding-right: 4px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    /* Fix Chrome mobile address bar bounce */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
  }

  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.15s;
    min-width: 48px;
  }
  .bottom-nav a .nav-emoji { font-size: 1.3rem; }
  .bottom-nav a.active { color: var(--primary); font-weight: 600; }
  .bottom-nav a:hover { text-decoration: none; }
}

/* --- Mobile Menu Toggle (legacy, replaced by bottom nav) --- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 4px;
}

/* Fix: disable hover effects on touch devices (prevents double-tap) */
@media (hover: none) {
  .board-card:hover { box-shadow: var(--shadow-sm); transform: none; }
  .thread-item:hover { background: transparent; }
  .sidebar-nav li a:hover { background: transparent; }
  .faq-question:hover { background: transparent; }
  .post-action-btn:hover { background: transparent; }
  .toggle-btn:hover { background: var(--bg-tertiary); }
}

/* --- Utility --- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* --- YouTube Embed --- */
.yt-embed {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding-bottom: 56.25%;
  margin: 8px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.yt-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Post Images --- */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.post-content img:hover { opacity: 0.9; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  cursor: zoom-out;
  padding: 24px;
}
.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2001;
}
