/**
 * NigamaConnect Admin Web App — Official Profile & Broadcast Feed Stylesheet
 * Standard: Glassmorphic Dark UI v5.0.0 (Cosmic Midnight Theme)
 * Reference: webofficial_appnigamaconnect aesthetics
 * File: NigamaConnect-Admin-webapp/css/v5/admin-official-profile.css
 */

:root {
  --brand: #0FA3D9;
  --brand-light: #38bdf8;
  --brand-accent: #8B5CF6;
  --surface: rgba(15, 23, 42, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --text-sec: #94a3b8;
  --card: rgba(11, 21, 40, 0.75);
  --radius: 16px;
  --success: #4FD8A0;
  --danger: #ef4444;
  --warning: #f59e0b;
}

/* ── Profile Header Banner ─────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 21, 40, 0.9) 50%, rgba(30, 41, 59, 0.9) 100%);
  border-radius: var(--radius);
  padding: 36px 40px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(15, 163, 217, 0.1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 163, 217, 0.25);
  backdrop-filter: blur(16px);
}

.profile-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(15, 163, 217, 0.15) 0%, transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.profile-header::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(15, 163, 217, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 1;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid rgba(15, 163, 217, 0.7);
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(15, 163, 217, 0.35);
  flex-shrink: 0;
  position: relative;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  z-index: 1;
}

.profile-info h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.verified-icon {
  width: 24px;
  height: 24px;
  color: #0FA3D9;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-shadow: 0 0 12px rgba(15, 163, 217, 0.5);
  flex-shrink: 0;
}

.badge-official-header {
  font-size: 0.72rem;
  background: rgba(15, 163, 217, 0.16);
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 163, 217, 0.4);
  color: #38bdf8;
}

.profile-info p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 500px;
  line-height: 1.5;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-info p svg {
  color: #0FA3D9;
}

.stats-row {
  display: flex;
  gap: 36px;
  margin-top: 18px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #38bdf8 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(15, 163, 217, 0.3);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #94a3b8 !important;
}

.header-actions {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.btn-create-broadcast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0FA3D9 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(15, 163, 217, 0.35);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-create-broadcast:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 163, 217, 0.5);
  color: #ffffff;
}

/* ── Tabs Navigation ───────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  background: rgba(11, 21, 40, 0.65);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.tab {
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-sec);
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.tab:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  background: linear-gradient(135deg, rgba(15, 163, 217, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(15, 163, 217, 0.4);
  color: #38bdf8;
  box-shadow: 0 4px 14px rgba(15, 163, 217, 0.2);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ── 3-Card Side-by-Side Responsive Grid Layout ─────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 1280px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Post Card ─────────────────────────────────────────────── */
.post-card {
  background: rgba(11, 21, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 520px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  backdrop-filter: blur(14px);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(15, 163, 217, 0.15);
  border-color: rgba(15, 163, 217, 0.35);
}

.post-card-top {
  margin-bottom: 10px;
}

.post-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-official {
  font-size: 0.68rem;
  background: rgba(15, 163, 217, 0.12);
  color: #38bdf8;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(15, 163, 217, 0.3);
  letter-spacing: 0.04em;
}

.post-type-badge {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.type-pinned {
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.type-promoted {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.type-normal {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.post-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
  line-height: 1.4;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
  min-height: 2.8em;
}

.post-card-title:hover {
  color: #38bdf8;
}

.post-card-date {
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-card-date svg {
  width: 13px;
  height: 13px;
  color: #0FA3D9;
}

.post-card-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  min-height: 4em;
  cursor: pointer;
  word-break: break-word;
}

/* ── Scrollable Attachments Container ──────────────────────── */
.post-card-media-wrapper {
  width: 100%;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  position: relative;
  flex-shrink: 0;
}

.media-count-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(11, 21, 40, 0.85);
  color: #38bdf8;
  border: 1px solid rgba(15, 163, 217, 0.3);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.post-media-scroll-strip {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  gap: 8px;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

.post-media-scroll-strip::-webkit-scrollbar {
  height: 5px;
}
.post-media-scroll-strip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}
.post-media-scroll-strip::-webkit-scrollbar-thumb {
  background: rgba(15, 163, 217, 0.4);
  border-radius: 4px;
}
.post-media-scroll-strip::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 163, 217, 0.8);
}

.is-single-media .post-media-item {
  width: 100%;
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.is-multi-media .post-media-item {
  width: 88%;
  flex: 0 0 88%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.post-media-item img,
.post-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-indexer {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(2, 6, 23, 0.8);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
}

.media-video-overlay svg {
  width: 32px;
  height: 32px;
  color: #0FA3D9;
}

.post-text-only-banner {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.post-text-only-banner:hover {
  background: rgba(15, 163, 217, 0.08);
  border-color: rgba(15, 163, 217, 0.3);
  color: #38bdf8;
}

.post-text-only-banner svg {
  width: 24px;
  height: 24px;
}

/* ── Hashtags ──────────────────────────────────────────────── */
.post-hashtags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.post-hashtag-chip {
  font-size: 0.74rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(15, 163, 217, 0.1);
  padding: 2px 8px;
  border-radius: 14px;
  border: 1px solid rgba(15, 163, 217, 0.25);
}

.post-hashtag-more {
  font-size: 0.72rem;
  color: #64748b;
  align-self: center;
}

/* ── Likes & Comments Strip ────────────────────────────────── */
.post-card-analytics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: auto;
  margin-bottom: 14px;
}

.analytics-pill {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.analytics-pill svg {
  width: 16px;
  height: 16px;
  color: #0FA3D9;
  flex-shrink: 0;
}

.analytics-pill .count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.98rem;
  color: #38bdf8;
}

.analytics-pill .label {
  font-weight: 600;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ── Post Card Actions ─────────────────────────────────────── */
.post-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-card-details {
  flex: 1;
  background: linear-gradient(135deg, rgba(15, 163, 217, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: #38bdf8;
  border: 1px solid rgba(15, 163, 217, 0.35);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-card-details:hover {
  background: linear-gradient(135deg, #0FA3D9 0%, #8B5CF6 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 163, 217, 0.35);
  border-color: transparent;
}

.btn-card-details svg {
  width: 15px;
  height: 15px;
}

.btn-card-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #f87171;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-card-delete:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.btn-card-delete svg {
  width: 16px;
  height: 16px;
}

/* ── Followers / Following Grid ────────────────────────────── */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.user-card {
  background: rgba(11, 21, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.user-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(15, 163, 217, 0.35);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(15, 163, 217, 0.3);
}

.user-details {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-weight: 700;
  color: #f8fafc;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-action {
  color: #38bdf8;
  flex-shrink: 0;
}

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(11, 21, 40, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #94a3b8;
  backdrop-filter: blur(12px);
}

.empty-state svg {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  opacity: 0.6;
  color: #0FA3D9;
}

.empty-state h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 8px 0;
}

.empty-state p {
  max-width: 440px;
  margin: 0 auto 20px auto;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #94a3b8;
}

.btn-create-post-inline {
  display: inline-flex;
  background: linear-gradient(135deg, #0FA3D9 0%, #0284c7 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 163, 217, 0.3);
}

.btn-create-post-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 163, 217, 0.45);
  color: #ffffff;
}

/* ── Modal Overhaul ────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: rgba(11, 21, 40, 0.96);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 30px rgba(15, 163, 217, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(24px);
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
}

.modal-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header-title svg {
  color: #0FA3D9;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-author-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0FA3D9;
  box-shadow: 0 0 12px rgba(15, 163, 217, 0.35);
}

.author-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.author-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #f8fafc;
}

.verified-tick {
  width: 18px;
  height: 18px;
  color: #0FA3D9;
}

.badge-official-mini {
  font-size: 0.68rem;
  background: rgba(15, 163, 217, 0.14);
  color: #38bdf8;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(15, 163, 217, 0.3);
  text-transform: uppercase;
}

.author-meta {
  font-size: 0.82rem;
  color: #94a3b8;
}

.modal-post-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 14px 0;
  line-height: 1.35;
}

.modal-post-description {
  font-size: 1rem;
  color: #e2e8f0;
  line-height: 1.65;
  margin-bottom: 22px;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(15, 23, 42, 0.6);
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-media-gallery {
  margin-bottom: 22px;
}

.modal-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.modal-image-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  aspect-ratio: 16/10;
}

.modal-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.modal-image-item:hover img {
  transform: scale(1.04);
}

.zoom-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(2, 6, 23, 0.8);
  color: #38bdf8;
  border: 1px solid rgba(15, 163, 217, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
}

.zoom-indicator svg {
  width: 13px;
  height: 13px;
}

.modal-hashtags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hashtag-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(15, 163, 217, 0.12);
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 163, 217, 0.3);
}

.modal-analytics-strip-clean {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 24px;
}

.modal-stat-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(11, 21, 40, 0.75);
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-stat-pill svg {
  width: 22px;
  height: 22px;
  color: #0FA3D9;
}

.modal-stat-pill .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.45rem;
  font-weight: 800;
  color: #38bdf8;
}

.modal-stat-pill .txt {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.modal-comments-container {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

.modal-comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-comments-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-count-pill {
  background: rgba(15, 163, 217, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(15, 163, 217, 0.3);
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
}

.btn-refresh-comments {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-refresh-comments:hover {
  background: rgba(15, 163, 217, 0.12);
  color: #38bdf8;
  border-color: rgba(15, 163, 217, 0.3);
}

.btn-refresh-comments svg {
  width: 14px;
  height: 14px;
}

.modal-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.comment-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(15, 163, 217, 0.3);
}

.comment-bubble {
  flex: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
}

.comment-bubble-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #f8fafc;
}

.comment-author-email {
  font-size: 0.75rem;
  color: #64748b;
}

.comment-timestamp {
  margin-left: auto;
  font-size: 0.72rem;
  color: #94a3b8;
}

.comment-body {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
  white-space: pre-wrap;
}

.comments-loading-state, .no-comments-state {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.no-comments-state svg {
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  opacity: 0.5;
  color: #0FA3D9;
}

.comment-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #0FA3D9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px auto;
}

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ── Lightbox Image Modal ──────────────────────────────────── */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(12px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
}

.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}

.lightbox-container img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ── Toast Notifications ───────────────────────────────────── */
.profile-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(11, 21, 40, 0.95);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1200;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.profile-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-toast.toast-success {
  background: rgba(6, 95, 70, 0.95);
  border: 1px solid #059669;
}

.profile-toast.toast-error {
  background: rgba(153, 27, 27, 0.95);
  border: 1px solid #dc2626;
}

/* ── Light Theme Overrides ───────────────────────────────────────────── */
:root[data-theme="light"] .profile-card,
:root[data-theme="light"] .post-card,
:root[data-theme="light"] .modal-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
  color: #0F172A !important;
}

:root[data-theme="light"] .profile-name,
:root[data-theme="light"] .post-author-name,
:root[data-theme="light"] .modal-header h3 {
  color: #0F172A !important;
}

:root[data-theme="light"] .profile-bio,
:root[data-theme="light"] .post-caption,
:root[data-theme="light"] .post-meta-time {
  color: #475569 !important;
}

:root[data-theme="light"] .analytics-pill {
  background: #F8FAFC !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

:root[data-theme="light"] .analytics-pill .count {
  color: #0284C7 !important;
}

:root[data-theme="light"] .post-text-only-banner {
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
