/* ===== DeepImide Netdisk - WebChat Standard Theme ===== */

/* ---------- 主题变量（与 WebChat main.css 保持一致） ---------- */
:root {
  --bg-primary: #0a0a0f; --bg-secondary: #111118; --bg-tertiary: #1a1a24;
  --bg-hover: #22222e; --bg-active: #2a2a38;
  --text-primary: #e4e4e8; --text-secondary: #9898a4; --text-muted: #5a5a6a;
  --accent: #8b5cf6; --accent-hover: #7c3aed;
  --accent-light: rgba(139,92,246,0.1); --accent-light2: rgba(139,92,246,0.06);
  --border: rgba(255,255,255,0.06); --border-light: rgba(255,255,255,0.1);
  --success: #22c55e; --warning: #f59e0b; --error: #ef4444;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px; --radius-xl: 24px;
  --sidebar-w: 280px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4); --transition: 0.2s ease;
}

[data-theme="light"] {
  --bg-primary: #f8f9fc; --bg-secondary: #ffffff; --bg-tertiary: #f1f3f8;
  --bg-hover: #e8ebf2; --bg-active: #dddfe8;
  --text-primary: #1e293b; --text-secondary: #64748b; --text-muted: #94a3b8;
  --accent: #7c3aed; --accent-hover: #6d28d9;
  --accent-light: rgba(124,58,237,0.08); --accent-light2: rgba(124,58,237,0.04);
  --border: rgba(0,0,0,0.08); --border-light: rgba(0,0,0,0.12);
  --shadow: 0 8px 32px rgba(0,0,0,0.08);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}
body { display: flex; }
::selection { background: var(--accent-light); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-active); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header { padding: 12px; border-bottom: 1px solid var(--border); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
}
.sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.35));
}
[data-theme="light"] .sidebar-logo { filter: none; }
.sidebar-brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent, #8b5cf6), #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 16px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-list { flex: 1; overflow-y: auto; padding: 0 8px; }
.chat-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
  position: relative;
}
.chat-item:hover { background: var(--bg-hover); }
.chat-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}
.chat-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.chat-item-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-item-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-preview { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.user-profile:hover { background: var(--bg-hover); }
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.user-role { font-size: 11px; color: var(--text-muted); }

/* ---------- 用户菜单按钮 + 下拉（与主站一致） ---------- */
.user-more-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.user-more-btn:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.user-profile.open .user-more-btn {
  color: var(--accent);
}

/* 侧边栏登录按钮 */
.login-sidebar-btn {
  position: relative;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  overflow: hidden;
}

.login-sidebar-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.login-sidebar-btn:hover {
  background: linear-gradient(135deg, #9b6ff6, #8b5cf6);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

.login-sidebar-btn:hover::after {
  opacity: 1;
}

.login-sidebar-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .login-sidebar-btn {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

[data-theme="light"] .login-sidebar-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.user-dropdown {
  display: none;
  position: fixed;
  z-index: 9000;
  width: 240px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.user-dropdown.open {
  display: block;
  animation: dropdownSlideUp 0.2s ease;
}

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

.dropdown-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}

.dropdown-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}

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

.dropdown-account-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item.dropdown-logout {
  color: #ef4444;
}

.dropdown-item.dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

[data-theme="light"] .user-profile:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .user-dropdown {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .dropdown-item.dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* ---------- 主区域 ---------- */
.files-main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  transition: margin var(--transition);
}

/* 顶栏 */
.files-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.files-crumb {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
.crumb-link { color: var(--accent); cursor: pointer; }
.crumb-link:hover { text-decoration: underline; }
.crumb-sep { color: var(--text-muted); margin: 0 4px; }
.crumb-cur { color: var(--text-primary); font-weight: 600; }

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

.search-input {
  width: 180px;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); outline: none; }
.search-input::placeholder { color: var(--text-muted); }

/* 按钮（对齐 WebChat auth-btn / new-chat-btn 风格） */
.btn, .btn-ghost, .btn-primary, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.25s ease;
  white-space: nowrap;
}

/* ghost：透明底 + 细边框，hover 紫色光晕（对齐 WebChat new-chat-btn） */
.btn-ghost {
  border-color: var(--border-light);
  background: var(--bg-tertiary);
}
.btn-ghost:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.18);
}
.btn-ghost:active { transform: translateY(0); }

/* primary：紫色渐变（对齐 WebChat auth-btn） */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* danger：红色描边，hover 红晕 */
.btn-danger {
  color: var(--error);
  border-color: rgba(239,68,68,0.4);
  background: transparent;
}
.btn-danger:hover {
  background: rgba(239,68,68,0.1);
  border-color: var(--error);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.18);
}

/* 工具栏 */
.files-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.sel-info { font-size: 13px; color: var(--accent); font-weight: 500; }
.toolbar-spacer { flex: 1; }

/* 文件列表 */
.files-list-wrap {
  flex: 1;
  overflow: auto;
  padding: 0 12px 12px;
  position: relative;
}

.list-spinner {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: color-mix(in srgb, var(--bg-primary) 72%, transparent);
  backdrop-filter: blur(1px);
}
.spinner-ring {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text { font-size: 12px; color: var(--text-muted); }

.files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.files-table thead th {
  position: sticky; top: 0; z-index: 2;
  text-align: left;
  padding: 10px 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.files-table thead th:hover { color: var(--text-secondary); }
.sort-ind { opacity: 0.6; font-size: 11px; }
.col-check { width: 36px; }
.col-name { min-width: 300px; }
.col-size { width: 90px; }
.col-time { width: 150px; }
.col-act { width: 130px; }

.files-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.files-table tbody tr:hover { background: var(--bg-hover); }
tr.row-sel { background: var(--accent-light) !important; }
tr.row-dir td { font-weight: 500; }
.files-table td { padding: 9px 8px; vertical-align: middle; }
.files-table td.col-check { text-align: center; }
.files-table input[type=checkbox] { cursor: pointer; accent-color: var(--accent); }

.name-txt {
  display: inline-block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  margin-left: 2px;
  color: var(--text-primary);
  text-decoration: none;
}
.name-txt:hover { color: var(--accent); }

.fi-icon { margin-right: 7px; vertical-align: -3px; flex-shrink: 0; }
.tool-ico { vertical-align: -2px; display: inline-block; }

.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* 空状态 */
.files-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* 状态栏 */
.files-statusbar {
  flex-shrink: 0;
  padding: 6px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  font-size: 12px;
  color: var(--text-muted);
}

/* 拖拽覆盖层 */
.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(4px);
  border: 3px dashed var(--accent);
  border-radius: 8px;
  margin: 8px;
  pointer-events: none;
}
.drag-overlay::before {
  content: '📁';
  font-size: 48px;
  display: block;
  text-align: center;
  margin-bottom: 12px;
}
.drag-overlay-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drag-overlay-icon { font-size: 48px; }
.drag-overlay-title { font-size: 20px; font-weight: 600; color: var(--accent); }
.drag-overlay-desc { font-size: 13px; color: var(--text-secondary); }

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,15,0.6);
  backdrop-filter: blur(2px);
}
.modal-overlay.visible { display: flex; }
.modal-box {
  width: 360px;
  max-width: 90vw;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.modal-body { margin-bottom: 16px; }
.modal-body input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
}
.modal-body input[type="text"]:focus { border-color: var(--accent); outline: none; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .files-main { margin-left: 0; }
  .mobile-menu-btn { display: flex !important; }
  .search-input { width: 110px; }
}
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  border-radius: var(--radius-sm);
}
.mobile-menu-btn:hover { background: var(--bg-hover); }


/* ===== 2026-10-27 修复: 上传进度条样式 ===== */
.upload-progress {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2000;
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  background: var(--bg-secondary, #111118);
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 8px 32px rgba(0,0,0,0.4));
  display: none;
  flex-direction: column;
  gap: 8px;
  animation: uploadProgressIn 0.25s ease;
}
.upload-progress-label {
  font-size: 13px;
  color: var(--text-secondary, #9898a4);
  text-align: center;
  line-height: 1.4;
  word-break: break-all;
}
.upload-progress-track {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary, #1a1a24);
  overflow: hidden;
}
.upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent, #8b5cf6), #a78bfa);
  transition: width 0.2s ease;
}
@keyframes uploadProgressIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 2026-10-27 修复: 操作图标保持一排 ===== */
.col-act { width: 160px; white-space: nowrap; }
.col-act .icon-btn { display: inline-flex; align-items: center; justify-content: center; }

/* ===== 2026-10-27 修复: 内存条(配额)样式 ===== */
.quota-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  margin: 8px 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
}
.quota-label { font-size: 12px; color: var(--text-secondary, #9898a4); font-weight: 500; }
.quota-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.quota-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
  transition: width 0.4s ease;
}

/* ===== 2026-10-27 移动端优化 ===== */
/* 窄屏（手机/平板）下表格操作列保持一排、图标紧凑排列，避免 4 个操作按钮
   在 375px 等小屏下换行/溢出，同时保证触控面积不过度缩小 */
@media (max-width: 768px) {
  .col-act {
    width: 132px;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
  }
  .col-act .icon-btn {
    padding: 4px 5px;
  }
}

/* ===== 2026-11-02 footer 极简单行（网盘） ===== */
.site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding: 6px 12px;
  text-align: center;
  background: transparent;
  border-top: none;
}
.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 12px;
  font-size: 12px;
  color: var(--text-secondary, #9898aa);
  opacity: 0.75;
}
.site-footer .footer-links { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .footer-links a { color: inherit; text-decoration: none; font-size: 12px; white-space: nowrap; }
.site-footer .footer-sep { opacity: 0.4; }
.site-footer .footer-icp, .site-footer .footer-copy { font-size: 12px; opacity: 0.75; }

/* ===== 2026-11-10 灯箱图片自适应:大图不超出屏幕 ===== */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  cursor: zoom-out;
  overflow: hidden;
}
.lightbox #lightboxImg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
@media (max-width: 768px) {
  .lightbox #lightboxImg {
    max-width: 96vw;
    max-height: 88vh;
  }
}
