:root {
  --bg-dark: #0a0d14;
  --bg-sidebar: #111723;
  --bg-card: #161e2e;
  --bg-input: #1b2438;
  --bg-bubble-in: #1e283d;
  --bg-bubble-out: #059669;
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-purple: #6366f1;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
}

/* ─────────────────────────────────────────────────────────────
   PAIRING / LOGIN SCREEN
───────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0a0d14 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 820px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 768px) {
  .auth-card {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
}

.auth-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-steps {
  list-style: none;
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 20px 0;
}

.auth-steps li {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-steps li::before {
  content: counter(step-counter);
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent);
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.auth-steps strong {
  color: var(--text-main);
}

.auth-qr-pane {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(10, 13, 20, 0.5);
}

.qr-box {
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}

.qr-box canvas, .qr-box img {
  max-width: 100%;
  max-height: 100%;
}

.qr-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.pair-code-badge {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alt-auth-links {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--accent-light);
}

/* ─────────────────────────────────────────────────────────────
   MAIN MESSENGER LAYOUT
───────────────────────────────────────────────────────────── */
#appContainer, #app-container, .app-container {
  display: flex !important;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
}

/* SIDEBAR */
.sidebar {
  width: 380px;
  min-width: 320px;
  max-width: 420px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

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

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

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

.user-id-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.status-pill {
  font-size: 11px;
  color: var(--accent-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 6px var(--accent-light);
}

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

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* TABS & SEARCH */
.sidebar-controls {
  padding: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tabs-bar {
  display: flex;
  background: var(--bg-input);
  border-radius: 12px;
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.search-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  padding: 9px 0;
  color: var(--text-main);
  font-size: 13px;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* CHAT LIST */
.chat-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
}

.chat-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-item.active {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
}

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

.chat-item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.chat-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.chat-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-item-snippet {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

/* ─────────────────────────────────────────────────────────────
   CHAT PANEL (RIGHT)
───────────────────────────────────────────────────────────── */
.chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  height: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

/* EMPTY STATE */
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, rgba(10, 13, 20, 0) 70%);
  user-select: none;
}

.chat-empty .empty-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
}

.chat-empty h2 {
  color: var(--text-main);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.chat-empty .empty-desc {
  font-size: 14px;
  max-width: 440px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.chat-empty .empty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--accent-light);
  font-weight: 600;
}

/* ACTIVE CHAT VIEW */
.chat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-sidebar);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-name {
  font-size: 16px;
  font-weight: 700;
}

.chat-header-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.back-btn-mobile {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
  margin-right: 8px;
  padding: 4px;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE LAYOUT: MOBILE (< 640px) vs DESKTOP/LAPTOP (>= 641px)
───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
  .sidebar.hidden-mobile {
    display: none !important;
  }
  .chat-pane {
    position: absolute !important;
    inset: 0 !important;
    z-index: 50 !important;
    display: none !important;
    width: 100% !important;
  }
  .chat-pane.active-mobile {
    display: flex !important;
  }
  .back-btn-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}

@media (min-width: 641px) {
  .sidebar {
    display: flex !important;
    width: 380px !important;
    min-width: 320px !important;
    max-width: 420px !important;
  }
  .chat-pane {
    display: flex !important;
    position: relative !important;
    flex: 1 !important;
  }
  .back-btn-mobile {
    display: none !important;
  }
}

.messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-row {
  display: flex;
  flex-direction: column;
  max-width: 65%;
}

.message-row.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.message-row.received {
  align-self: flex-start;
  align-items: flex-start;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
}

.message-row.sent .message-bubble {
  background: var(--bg-bubble-out);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-row.received .message-bubble {
  background: var(--bg-bubble-in);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
}

.message-row.received .message-meta {
  color: var(--text-muted);
}

/* INPUT BAR */
.chat-input-bar {
  padding: 14px 20px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-bar input:focus {
  border-color: var(--border-focus);
}

.btn-send {
  background: var(--accent);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 18px;
}

.btn-send:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}

/* ─────────────────────────────────────────────────────────────
   MODALS
───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.modal-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  margin-bottom: 20px;
}

.modal-input:focus {
  border-color: var(--border-focus);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────
   ATTACHMENT SYSTEM & CONTROLS
───────────────────────────────────────────────────────────── */
.attachment-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-attach {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.btn-attach:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(15deg);
}

.attachment-menu {
  position: absolute;
  bottom: 56px;
  left: 0;
  background: #181c28;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  z-index: 100;
  backdrop-filter: blur(16px);
  animation: attachMenuPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes attachMenuPop {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}

.attachment-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.attachment-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* MEDIA & ATTACHMENT MESSAGE BUBBLES */
.message-image-wrap {
  border-radius: 12px;
  overflow: hidden;
  max-width: 300px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.message-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, opacity 0.2s;
}

.message-image:hover {
  opacity: 0.92;
  transform: scale(1.015);
}

.message-caption {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.message-audio-wrap {
  display: flex;
  align-items: center;
  padding: 4px 0;
  max-width: 280px;
}

.message-audio-wrap audio {
  width: 100%;
  height: 38px;
  outline: none;
}

.message-file-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  max-width: 320px;
}

.message-file-wrap .file-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.message-file-wrap .file-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.message-file-wrap .file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-file-wrap .file-size {
  font-size: 11px;
  color: var(--text-muted);
}

.file-dl-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.file-dl-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ATTACHMENT SEND PREVIEW MODAL */
.attach-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

.attach-preview-card {
  background: #181c28;
  border: 1px solid var(--border);
  border-radius: 18px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}

.attach-preview-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.attach-preview-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-height: 360px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
}

.attach-preview-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.attach-preview-filebox {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  width: 100%;
}

.filebox-icon {
  font-size: 36px;
}

.filebox-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.filebox-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filebox-size {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.attach-preview-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  background: #141722;
}

.attach-caption-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.attach-caption-input:focus {
  border-color: var(--border-focus);
}

/* MEDIA LIGHTBOX VIEWER */
.media-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  animation: fadeIn 0.15s ease-out;
}

.media-modal-header {
  position: absolute;
  top: 18px;
  right: 24px;
  display: flex;
  gap: 12px;
  z-index: 1010;
}

.media-modal-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.media-modal-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.media-modal-content {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.8);
}
