/**
 * Robotics & Mechatronics Club
 * Forum & Q&A Stylesheet
 */

/* Forum Top Bar & Controls */
.forum-header-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.forum-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.user-identity-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
}

.instructor-badge {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(26, 42, 76, 0.8) 0%, rgba(35, 27, 13, 0.6) 100%);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.15);
}

.user-avatar {
  font-size: 1.4rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.verified-icon {
  font-size: 0.68rem;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Identity Toggle Switch */
.identity-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  transition: 0.25s;
  border-radius: 24px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: 0.25s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: #0284c7;
  border-color: var(--accent-cyan);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
  background-color: #ffffff;
}

/* Forum Actions Top */
.forum-actions-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Forum Filter Bar */
.forum-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.forum-filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.forum-status-filter-pills {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.2rem;
}

.forum-status-filter-btn {
  padding: 0.45rem 0.85rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.forum-status-filter-btn:hover {
  color: var(--text-primary);
}

.forum-status-filter-btn.active {
  background: var(--bg-surface);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.forum-session-select {
  padding: 0.5rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  max-width: 100%;
  box-sizing: border-box;
}

.forum-sort-select {
  padding: 0.5rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  max-width: 100%;
  box-sizing: border-box;
}

/* Threads List & Cards */
.forum-threads-container {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.thread-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  transition: all var(--transition-fast);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.thread-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-2px);
}

.thread-card.is-solved {
  border-left: 4px solid var(--accent-emerald);
}

/* Vote Sidebar */
.thread-vote-sidebar {
  background: rgba(13, 21, 39, 0.6);
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.btn-vote {
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-vote:hover {
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.25);
}

.btn-vote.has-voted {
  color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.18);
  border-color: var(--accent-cyan);
  font-weight: 700;
}

.vote-arrow {
  font-size: 0.9rem;
}

.vote-count {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Thread Body */
.thread-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  cursor: pointer;
}

.thread-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.session-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 210, 255, 0.25);
}

.session-tag.large {
  font-size: 0.82rem;
  padding: 0.25rem 0.7rem;
}

.thread-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.thread-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.thread-title:hover {
  color: var(--accent-cyan);
}

.thread-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.thread-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.avatar-small {
  font-size: 1.1rem;
}

.author-name {
  color: var(--text-primary);
  font-weight: 500;
}

.meta-dot {
  color: var(--border-strong);
}

.reply-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Empty State */
.empty-state-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-state-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Thread Full View in Modal */
.thread-full-view {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.thread-full-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.thread-meta-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.thread-full-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.thread-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.thread-full-body {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.code-block-wrapper {
  background: #0a0f1d;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
  overflow: hidden;
}

.code-block-header {
  background: #111a2e;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-copy-code:hover {
  background: var(--accent-cyan);
  color: #030d20;
}

/* Replies Section */
.replies-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 1px solid var(--border-strong);
  padding-top: 1.5rem;
}

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

.instructor-mode-indicator {
  font-size: 0.82rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

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

.reply-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.reply-item.instructor-reply {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(20, 32, 58, 0.95) 0%, rgba(30, 24, 15, 0.4) 100%);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.08);
}

.reply-item.accepted-answer {
  border-color: var(--accent-emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(19, 31, 56, 0.9) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.accepted-banner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.reply-actions-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-vote-mini {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

.btn-vote-mini:hover, .btn-vote-mini.has-voted {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.12);
}

.btn-mark-accepted {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-mark-accepted:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.btn-mark-accepted.is-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: #34d399;
  font-weight: 600;
}

.link-badge {
  text-decoration: none;
}

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

.reply-content {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Add Reply Box */
.add-reply-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
}

.add-reply-box h4 {
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
}

.reply-user-prompt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.reply-textarea {
  margin-bottom: 0.85rem;
  background: #09101f;
}

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

.markdown-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==============================================
   RESPONSIVE MOBILE STYLES FOR FORUM
   ============================================== */
@media (max-width: 768px) {
  .forum-header-bar {
    padding: 1rem 0.85rem;
    margin-bottom: 1.25rem;
    gap: 1rem;
    border-radius: var(--radius-md);
  }

  .forum-user-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding-bottom: 0.85rem;
  }

  .user-identity-container {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .user-profile-badge {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
  }

  .user-info {
    min-width: 0;
    flex: 1;
  }

  .user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
  }

  #forum-my-account-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .forum-actions-top {
    width: 100%;
  }

  .forum-actions-top .btn,
  #btn-open-ask-modal {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    box-sizing: border-box;
  }

  .forum-filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .forum-filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .forum-status-filter-pills {
    width: 100%;
    display: flex;
    box-sizing: border-box;
  }

  .forum-status-filter-btn {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.35rem;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .forum-session-select,
  .forum-sort-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-overflow: ellipsis;
  }

  .search-box-wrapper,
  .forum-search-box-wrapper {
    width: 100% !important;
    min-width: 0 !important;
  }

  .resources-search-input {
    width: 100%;
    box-sizing: border-box;
  }

  /* Thread Cards Mobile */
  .thread-card {
    border-radius: var(--radius-md);
  }

  .thread-vote-sidebar {
    padding: 0.85rem 0.5rem;
    min-width: 44px;
  }

  .btn-vote {
    padding: 0.35rem 0.4rem;
  }

  .vote-arrow {
    font-size: 0.8rem;
  }

  .vote-count {
    font-size: 0.82rem;
  }

  .thread-body {
    padding: 0.85rem 0.75rem;
    min-width: 0;
  }

  .thread-title {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .thread-excerpt {
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 0.75rem;
  }

  .thread-footer-meta {
    font-size: 0.76rem;
    gap: 0.5rem;
  }

  .author-meta {
    gap: 0.35rem;
  }

  /* Thread View Modal Mobile */
  .thread-full-title {
    font-size: 1.25rem;
  }

  .thread-full-header {
    padding-bottom: 0.85rem;
  }

  .thread-full-body {
    font-size: 0.9rem;
  }

  .reply-item {
    padding: 0.85rem 0.75rem;
  }

  .reply-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .reply-actions-row {
    width: 100%;
    justify-content: space-between;
  }

  .add-reply-box {
    padding: 1rem 0.85rem;
  }

  .reply-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .reply-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   FORUM PHOTO ATTACHMENTS & HEAVY COMPRESSION STYLES
   ============================================================ */

.photo-compress-badge {
  font-size: 0.73rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.photo-dropzone {
  border: 2px dashed rgba(0, 210, 255, 0.35);
  border-radius: var(--radius-md);
  background: rgba(0, 210, 255, 0.02);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.photo-dropzone:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 210, 255, 0.06);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.12);
}

.photo-dropzone.dragover {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  transform: scale(1.01);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.dropzone-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 6px rgba(0, 210, 255, 0.4));
  transition: transform var(--transition-fast);
}

.photo-dropzone:hover .dropzone-icon {
  transform: translateY(-2px) scale(1.05);
}

.dropzone-text {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.dropzone-text strong {
  color: var(--accent-cyan);
}

.dropzone-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 440px;
}

/* Previews Grid in Ask Modal */
.photos-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.photo-preview-item {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.photo-preview-thumb-wrap {
  position: relative;
  width: 100%;
  height: 90px;
  background: #060b16;
  overflow: hidden;
}

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

.btn-remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(244, 63, 94, 0.6);
  color: #f43f5e;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-remove-photo:hover {
  background: #f43f5e;
  color: #ffffff;
  transform: scale(1.1);
}

.photo-savings-meta {
  padding: 0.35rem 0.45rem;
  background: rgba(10, 17, 33, 0.95);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.photo-savings-badge {
  color: #00ff88;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.photo-size-info {
  color: var(--text-muted);
  font-size: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Thread Card Photo Indicators */
.thread-card-photo-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.6rem 0 0.4rem 0;
}

.badge-photo-count {
  font-size: 0.72rem;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  white-space: nowrap;
}

.thread-card-mini-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Thread Full View Gallery */
.thread-photos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.thread-photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 18, 36, 0.6);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.thread-photo-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.25);
  transform: translateY(-2px);
}

.thread-photo-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-normal);
}

.thread-photo-card:hover .thread-photo-img {
  transform: scale(1.03);
}

.thread-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.75) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.photo-overlay-zoom {
  font-size: 0.75rem;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.photo-overlay-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Reply Photo Attachments */
.reply-photo-attach-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.reply-attach-btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.reply-attach-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
}

.reply-compress-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.reply-photo-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  height: 130px;
  transition: all var(--transition-fast);
}

.reply-photo-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.reply-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox Modal */
.lightbox-overlay {
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(10px);
  z-index: 10000;
}

.lightbox-dialog {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-close-btn:hover {
  background: rgba(244, 63, 94, 0.8);
  border-color: #f43f5e;
  transform: scale(1.1);
}

.lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000000;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox-footer {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.lightbox-caption {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.lightbox-action-btn:hover {
  background: var(--accent-cyan);
  color: #030712;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}
