@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ========================================================================= */
/* MASTER UNIFIED STYLESHEET (clean_v2/styles.css)                           */
/* Clean, Modern, Glassmorphic, 0-Latency Messenger Stylesheet               */
/* Universal Transparent Button Architecture across all views               */
/* ========================================================================= */

:root {
  --primary-neon: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.4);
  --accent-cyan: #38bdf8;
  --accent-pink: #ec4899;
  --accent-purple: #8b5cf6;
  --accent-amber: #f59e0b;
  --danger-red: #ef4444;
  --bg-dark: #0f172a;
  --glass-surface: rgba(30, 41, 59, 0.82);
  --glass-border: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
}

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 15% 15%, #1e1b4b 0%, #0f172a 60%, #060b13 100%);
  color: #f8fafc;
  overflow: hidden;
  font-size: 10px;
}

/* ========================================================================= */
/* UNIVERSAL TRANSPARENT BUTTON ARCHITECTURE                                */
/* ========================================================================= */
button,
input[type="button"],
input[type="submit"],
.btn,
.btn-submit,
.btn-selfie-login,
.chat-send-btn,
.group-tool-btn,
.group-create-btn,
.header-tool-btn,
.back-btn,
.call-btn,
.call-popbox-btn,
.call-action-btn,
.action-choice-btn,
.red-plus-choice-btn,
.publish-btn,
.modal-btn,
.auth-tab-btn,
.search-btn,
.feed-btn,
.btn-action-neon,
.btn-install-pwa,
.channel-tab-btn,
.rgb-animated-btn,
.home-btn,
.big-plus-trigger-btn,
.mini-icon-btn,
.mini-send-btn,
.attach-main-btn,
.attach-choice-btn,
.emoji-cat-btn,
.emoji-item-btn {
  background: transparent !important;
  background-color: transparent !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.btn:hover,
.btn-submit:hover,
.btn-selfie-login:hover,
.chat-send-btn:hover,
.group-tool-btn:hover,
.group-create-btn:hover,
.header-tool-btn:hover,
.back-btn:hover,
.call-btn:hover,
.call-popbox-btn:hover,
.call-action-btn:hover,
.action-choice-btn:hover,
.red-plus-choice-btn:hover,
.publish-btn:hover,
.modal-btn:hover,
.auth-tab-btn:hover,
.search-btn:hover,
.feed-btn:hover,
.btn-action-neon:hover,
.btn-install-pwa:hover,
.channel-tab-btn:hover,
.rgb-animated-btn:hover,
.home-btn:hover,
.big-plus-trigger-btn:hover,
.mini-icon-btn:hover,
.mini-send-btn:hover,
.attach-main-btn:hover,
.attach-choice-btn:hover,
.emoji-cat-btn:hover,
.emoji-item-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.6) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

button:active,
.btn:active,
.call-btn:active,
.call-action-btn:active {
  transform: scale(0.95);
  background: rgba(16, 185, 129, 0.15) !important;
}

/* Call Popbox Buttons Distinction */
.call-popbox-btn.decline,
.call-btn.end,
.danger-btn {
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #fca5a5 !important;
}
.call-popbox-btn.decline:hover,
.call-btn.end:hover,
.danger-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
}

.call-popbox-btn.accept,
.success-btn {
  border-color: rgba(16, 185, 129, 0.8) !important;
  color: #4ade80 !important;
}
.call-popbox-btn.accept:hover,
.success-btn:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5) !important;
}

/* ========================================================================= */
/* LAYOUT & HEADERS                                                          */
/* ========================================================================= */
#app-container {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  flex-direction: column;
}

header, #chat-header, #friends-header, #group-header {
  padding: 0.5rem 0.8rem;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f8fafc;
  border-bottom: 1.5px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  z-index: 30;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Image Profile in Header */
.header-profile-img, .avatar-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #f8fafc;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  user-select: none;
}
.avatar-wrapper:hover {
  transform: scale(1.06);
  border-color: #38bdf8;
}
.avatar-wrapper.mini {
  width: 26px;
  height: 26px;
  font-size: 9.5px;
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 6px #22c55e;
}
.status-dot.offline {
  background: #64748b;
  box-shadow: none;
}

/* ========================================================================= */
/* ACTIVE CHATTED FRIENDS STRIP (Community Feed & Index)                    */
/* ========================================================================= */
.active-chats-bar-wrapper {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  z-index: 9;
}

.big-plus-trigger-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.active-chats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.4) transparent;
  min-height: 50px;
  flex: 1;
}
.active-chats-bar::-webkit-scrollbar {
  height: 3px;
}
.active-chats-bar::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.5);
  border-radius: 3px;
}

.chat-strip-user {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.15s ease;
  user-select: none;
}
.chat-strip-user:hover {
  transform: translateY(-2px);
}
.chat-strip-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.chat-strip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-strip-name {
  font-size: 7.5px;
  color: #cbd5e1;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ========================================================================= */
/* COMMUNITY FEED & CARDS                                                    */
/* ========================================================================= */
.unified-feed-card, .unified-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.post-item-card {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s;
}
.post-item-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
}

.post-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.post-author-box {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.post-author-name {
  font-weight: 700;
  color: #38bdf8;
  font-size: 10px;
}
.post-timestamp {
  font-size: 7.5px;
  color: #64748b;
}

.post-title-display {
  font-size: 11.5px;
  font-weight: 800;
  color: #f8fafc;
}
.post-body-display {
  color: #e2e8f0;
  line-height: 1.4;
  word-break: break-word;
  font-size: 10px;
}

/* ========================================================================= */
/* CHAT MESSAGES & URL REDIRECT BADGES                                       */
/* ========================================================================= */
#chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}
.chat-bubble-row.mine {
  align-self: flex-end;
  align-items: flex-end;
}
.chat-bubble-row.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  word-break: break-word;
  font-size: 10px;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.chat-bubble-row.mine .chat-bubble {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.6), rgba(16, 185, 129, 0.7));
  border-color: rgba(52, 211, 153, 0.4);
}

.chat-platform-url-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #10b981;
  border-radius: 6px;
  padding: 3px 8px;
  margin: 3px 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 9px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.chat-platform-url-link:hover {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.98);
}

/* ========================================================================= */
/* CALL POPBOX DIALING & INCOMING NOTIFICATIONS                             */
/* ========================================================================= */
.calling-popbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.calling-popbox-card {
  width: 360px;
  max-width: 95vw;
  background: rgba(15, 23, 42, 0.98);
  border: 2px solid #10b981;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 16px 50px rgba(0,0,0,0.85), 0 0 30px rgba(16, 185, 129, 0.4);
  animation: popboxBounce 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popboxBounce {
  0% { opacity: 0; transform: scale(0.85) translateY(-20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.popbox-avatar-ring {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
  animation: pulseGlowRing 2s infinite ease-in-out;
  overflow: hidden;
}
.popbox-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes pulseGlowRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 16px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* R&B Soundwave Equalizer Animation */
.rnb-wave-bar {
  width: 3px;
  background: #10b981;
  border-radius: 3px;
  display: inline-block;
  animation: waveBar 0.8s infinite ease-in-out;
}
.rnb-wave-bar:nth-child(2) { animation-delay: 0.15s; background: #38bdf8; }
.rnb-wave-bar:nth-child(3) { animation-delay: 0.3s; background: #a855f7; }
.rnb-wave-bar:nth-child(4) { animation-delay: 0.45s; background: #ec4899; }
.rnb-wave-bar:nth-child(5) { animation-delay: 0.6s; background: #10b981; }

@keyframes waveBar {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

/* ========================================================================= */
/* MODALS & POPUPS                                                           */
/* ========================================================================= */
.modal-overlay, #plus-options-modal, #create-post-modal, #selfie-login-modal, #unreg-face-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 12px;
}

.modal-card, .plus-options-card, .selfie-card, .unreg-face-card {
  background: rgba(30, 27, 75, 0.98);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 1.2rem;
  width: 360px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85);
}

/* Progress Bar Styling */
.progress-bar-container {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4, #38bdf8);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px #10b981;
}

/* Transparent Back To Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  user-select: none;
}
.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top-btn:hover {
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

/* Gallery & Slider in Group Profile */
.image-slider-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.5) transparent;
}
.image-slider-container::-webkit-scrollbar {
  height: 4px;
}
.image-slider-container::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.5);
  border-radius: 4px;
}
.slider-thumb-item {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.slider-thumb-item:hover {
  border-color: #38bdf8;
  transform: scale(1.05);
}
.slider-thumb-item.active-avatar {
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
.slider-thumb-item.selected-loop {
  border-color: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}
.slider-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-check-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-platform-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.social-platform-card:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  transform: translateY(-1px);
}

/* Big Arrow Back Button Standard */
.big-back-btn {
  font-size: 18px !important;
  font-weight: 900 !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  border-radius: 9px !important;
  padding: 2px 8px !important;
}

/* Privacy Toggle Switch */
.privacy-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-size: 9px;
  color: #cbd5e1;
}
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .25s;
  border-radius: 18px;
}
.slider-toggle:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .25s;
  border-radius: 50%;
}
input:checked + .slider-toggle {
  background-color: #10b981;
}
input:checked + .slider-toggle:before {
  transform: translateX(14px);
}

/* Social link chip with logo */
.social-link-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  padding: 4px 10px;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
  font-size: 9.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.social-link-item-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* Create Post Modal, Unified Preview & Live Broadcast Studio Styles */
#create-post-modal {
  position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 10px;
}
#create-post-box {
  width: 460px; max-width: 100%; max-height: 94vh; overflow-y: auto;
  background: rgba(30, 41, 59, 0.96); border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem;
}
.create-post-header { display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: #fff; }

.post-title-input {
  width: 100%; background: #0b1120; border: 1px solid #334155;
  border-radius: 8px; padding: 0.5rem 0.75rem; color: #38bdf8; font-size: 10.5px;
  font-weight: 700; outline: none;
}
.post-textarea {
  width: 100%; min-height: 65px; background: #0b1120;
  border: 1px solid #334155; border-radius: 8px; padding: 0.55rem;
  color: #fff; font-size: 10px; resize: vertical; outline: none;
}

/* Unified Preview Box */
#unified-preview-box {
  display: none; position: relative; background: #0b1120;
  border: 1px solid rgba(16, 185, 129, 0.4); border-radius: 10px; padding: 8px;
  max-height: 380px; overflow-y: auto;
}
.preview-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.preview-type-badge {
  background: rgba(16, 185, 129, 0.2); color: #4ade80; border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 5px; padding: 2px 6px; font-size: 8px; font-weight: 700;
}
.remove-preview-btn {
  background: transparent !important; border: 1px solid rgba(239, 68, 68, 0.6) !important; color: #f87171 !important;
  border-radius: 50%; width: 20px; height: 20px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 9px;
}
.preview-content-area img, .preview-content-area video { width: 100%; max-height: 170px; object-fit: contain; border-radius: 6px; display: block; }

.preview-audio-card {
  background: rgba(30, 41, 59, 0.75); border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px; border-radius: 6px; display: flex; flex-direction: column; gap: 4px;
}
.preview-audio-card audio { width: 100%; height: 32px; border-radius: 5px; }

.preview-link-card {
  background: rgba(30, 41, 59, 0.7); border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px; border-radius: 6px; display: flex; flex-direction: column; gap: 2px;
}
.preview-link-title { font-weight: 700; color: #38bdf8; font-size: 9.5px; }
.preview-link-url { color: #94a3b8; font-size: 8px; word-break: break-all; }

/* Caption Box & Error */
.caption-box-container { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.caption-input-box {
  width: 100%; min-height: 45px; background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.4); border-radius: 6px; padding: 0.45rem;
  color: #fff; font-size: 10px; outline: none; resize: vertical;
}
.caption-input-box.error-border {
  border: 1.5px solid #ef4444 !important; background: rgba(239, 68, 68, 0.08) !important;
}
.caption-error-text { color: #f87171; font-size: 8.5px; font-weight: 700; display: none; }
.preview-bottom-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 6px; }

/* Post Actions & Attachments Dropdown */
.post-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; position: relative; }
.attach-main-btn {
  background: transparent !important; border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px; padding: 5px 10px; color: #f8fafc; font-size: 9.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; font-weight: 600;
}
.attach-dropdown-menu {
  display: none; flex-direction: column; gap: 4px; background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(16, 185, 129, 0.35); border-radius: 10px; padding: 6px;
  margin-top: 6px;
}
.attach-menu-item {
  background: transparent !important; border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1; font-size: 9.5px; padding: 6px 10px; border-radius: 6px; text-align: left;
  cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 700;
}
.attach-menu-item:hover { background: rgba(16, 185, 129, 0.2) !important; color: #fff; border-color: #10b981; }
.attach-menu-item.highlight { border-color: #38bdf8; color: #38bdf8; }

/* Live Video Studio Modal */
#live-video-modal {
  position: fixed; inset: 0; z-index: 1300; background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 8px;
}
.live-studio-card {
  width: 460px; max-width: 100%; background: #0f172a; border: 1.5px solid #ef4444;
  border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
}
.live-viewport { position: relative; width: 100%; height: 270px; background: #000; overflow: hidden; }
#live-camera-feed { width: 100%; height: 100%; object-fit: contain; }
.live-badge-overlay {
  position: absolute; top: 8px; left: 8px; background: rgba(239, 68, 68, 0.9);
  color: #fff; font-weight: 800; font-size: 8.5px; padding: 3px 6px; border-radius: 5px;
  display: none; align-items: center; gap: 4px; z-index: 2;
}
.live-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.live-controls-bar { padding: 8px 12px; background: #1e293b; display: flex; justify-content: space-between; align-items: center; }

/* Live Stop Options Modal */
#live-stop-options-modal {
  position: fixed; inset: 0; z-index: 1350; background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 10px;
}
.live-stop-card {
  width: 360px; max-width: 100%; background: rgba(30, 27, 75, 0.98);
  border: 1.5px solid rgba(255, 255, 255, 0.2); border-radius: 12px; padding: 1rem;
  display: flex; flex-direction: column; gap: 8px;
}

/* Universal Transparent Buttons: Zero background on click / active / focus */
button:active,
button:focus,
input[type="button"]:active,
input[type="button"]:focus,
input[type="submit"]:active,
input[type="submit"]:focus,
.btn:active,
.btn:focus,
.call-btn:active,
.call-btn:focus,
.call-action-btn:active,
.call-action-btn:focus,
.publish-btn:active,
.publish-btn:focus,
.interact-btn:active,
.interact-btn:focus,
.action-choice-btn:active,
.action-choice-btn:focus,
.mini-icon-btn:active,
.mini-icon-btn:focus,
.post-menu-btn:active,
.post-menu-btn:focus,
.back-btn:active,
.back-btn:focus {
  background: transparent !important;
  background-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Plus Options Modal Centered Text Details */
#plus-options-modal .plus-options-card {
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
#plus-options-modal .plus-options-card * {
  text-align: center !important;
}
#plus-options-modal .plus-options-card .action-choice-btn {
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

/* Post Card Footer & Interaction Buttons */
.post-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
  margin-top: 4px;
}
.interaction-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.interact-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent !important;
  color: #cbd5e1;
  cursor: pointer;
}
.interact-btn:hover {
  border-color: #10b981;
  color: #fff;
}
.interact-btn.reacted {
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Comments Drawer */
.comments-drawer {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  margin-top: 6px;
}
.comment-bubble {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 9px;
  color: #e2e8f0;
  line-height: 1.35;
}
.comment-input-row {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.comment-input-row input {
  flex: 1;
  background: #0b1120;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 8px;
  color: #fff;
  font-size: 9px;
  outline: none;
}
.comment-send-btn {
  background: transparent !important;
  border: 1px solid #10b981 !important;
  color: #4ade80 !important;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

/* Zoom In / Zoom Out Lightbox Modal */
#media-zoom-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.zoom-controls-toolbar {
  position: absolute;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(16, 185, 129, 0.5);
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  z-index: 100000;
}
.zoom-controls-toolbar button {
  background: transparent !important;
  border: none !important;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
}
.zoom-controls-toolbar button:hover {
  color: #10b981;
}
.zoom-image-viewport {
  width: 100%;
  height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}
.zoom-image-viewport img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  transition: transform 0.15s ease-out;
  border-radius: 8px;
}

/* 200 Reaction Picker Modal */
#reaction-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.reaction-picker-card {
  width: 320px;
  max-width: 94vw;
  background: rgba(15, 23, 42, 0.98);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.85);
}
.reaction-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.emoji-categories-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.emoji-tab-btn {
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent !important;
  color: #cbd5e1;
  cursor: pointer;
}
.emoji-tab-btn.active {
  border-color: #10b981;
  color: #10b981;
}
.emoji-grid-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
  padding: 2px;
}
.emoji-btn-item {
  font-size: 16px;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: transform 0.1s;
}
.emoji-btn-item:hover {
  transform: scale(1.25);
}

/* Post Menu Divider */
.post-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 3px 0;
}
