:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #0f0f0f;
}

#root {
  min-height: 100vh;
}
/* 清新风格 Gallery CSS */

:root {
  --primary-color: #5fb3a1;
  --primary-light: #8ed4c7;
  --primary-dark: #3d8b7a;
  --bg-color: #f8fcfb;
  --bg-card: #ffffff;
  --bg-hover: #f0f0f0;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --danger-color: #e74c3c;
  --danger-light: #fadbd8;
  --favorite-color: #f1c40f;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* 加载状态 */
.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

.gallery-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.gallery-loading p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* 错误状态 */
.gallery-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

.gallery-error p {
  color: var(--danger-color);
  font-size: 14px;
}

.gallery-error button {
  padding: 10px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.gallery-error button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* 工具栏 */
.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left {
  display: flex;
  align-items: center;
}

.gallery-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.favorites-count {
  color: var(--favorite-color);
  font-weight: 600;
}

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

.toolbar-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.toolbar-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: white;
}

.toolbar-btn-danger {
  background: var(--danger-light);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.toolbar-btn-danger:hover {
  background: var(--danger-color);
  color: white;
}

.toolbar-btn-favorite {
  background: #fef9e7;
  border-color: var(--favorite-color);
  color: #b7950b;
}

.toolbar-btn-favorite:hover {
  background: var(--favorite-color);
  color: white;
}

.toolbar-btn-active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 网格布局 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 20px;
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
}

/* 卡片 */
.gallery-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery-card.selected {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.gallery-card.favorited {
  box-shadow: 0 0 0 2px var(--favorite-color), var(--shadow-sm);
}

/* 骨架屏加载 */
.gallery-card.skeleton {
  pointer-events: none;
}

.gallery-card.skeleton .skeleton-image {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.gallery-card.skeleton .skeleton-date {
  height: 12px;
  width: 60%;
  margin: 12px auto;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 收藏按钮 */
.favorite-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: var(--text-muted);
}

.favorite-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.favorite-btn.active {
  color: var(--favorite-color);
}

.card-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--primary-color);
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.gallery-card.selected .card-checkbox {
  background: var(--primary-color);
  color: white;
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.card-date {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.03));
}

/* 空状态 */
.gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.gallery-empty p {
  color: var(--text-muted);
  font-size: 15px;
}

/* 加载更多 */
.gallery-loading-more,
.gallery-end {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.gallery-loading-more .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1200px;
}

.gallery-loading-more .gallery-card.skeleton .skeleton-image {
  aspect-ratio: 1;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Modal 遮罩 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

/* Emerging animation for modal */
.modal-overlay-emerging {
  animation: emerge 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes emerge {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content-emerging {
  animation: emergeContent 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal 内容 - 最大化显示 */
.modal-content {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
  border: none;
  outline: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 关闭按钮 */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.7);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

/* 导航箭头 */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: none;
  cursor: pointer;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

/* Subtle/transparent navigation arrows */
.modal-nav-subtle {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.25);
  opacity: 0.3;
  transition: all 0.3s ease;
}

.modal-nav-subtle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

/* Always show arrows but very subtle */
.modal-overlay-emerging .modal-nav-subtle {
  opacity: 0.25;
}

.modal-overlay-emerging:hover .modal-nav-subtle {
  opacity: 0.5;
}

.modal-overlay-emerging .modal-nav-subtle:hover {
  opacity: 1;
}

.modal-nav-prev {
  left: 16px;
}

.modal-nav-next {
  right: 16px;
}

/* Tab 切换 */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.modal-tab {
  flex: 1;
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
  position: relative;
}

.modal-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.modal-tab.active {
  color: #fff;
  font-weight: 500;
}

.modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Modal 内容区 */
.modal-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: transparent;
}

.modal-image {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* Image viewer in modal */
.modal-body-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  background: transparent;
  cursor: zoom-in;
}

.modal-image-viewer {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease;
}

.modal-image-viewer:hover {
  transform: scale(1.02);
}

/* Info button */
.modal-info-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.modal-info-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Detail Modal */
.detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  animation: fadeIn 0.3s ease;
}

.detail-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s ease;
}

.detail-modal-full {
  background: transparent;
}

.detail-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.5);
}

.detail-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Full screen image body */
.modal-body-full {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 80px;
  background: transparent;
}

.modal-image-full {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Floating Banner */
.floating-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideUpFade 0.3s ease;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.floating-banner-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.floating-banner-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.floating-banner-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.floating-banner-btn-delete {
  background: rgba(231, 76, 60, 0.2);
  border-color: rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

.floating-banner-btn-delete:hover {
  background: rgba(231, 76, 60, 0.3);
}

.floating-banner-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Simplified info grid for modal footer */
.detail-info-grid-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Mobile: compact footer bar */
@media (max-width: 480px) {
  .detail-modal-footer-glass {
    padding: 12px 16px 16px;
    gap: 8px;
  }

  .detail-info-grid-simple {
    gap: 12px;
    flex-wrap: wrap;
  }

  .zoom-control-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .zoom-level {
    font-size: 13px;
    min-width: 40px;
  }

  .modal-favorite,
  .prompt-toggle-btn {
    font-size: 20px;
    padding: 6px;
  }
}

.prompt-toggle-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  padding: 8px;
}

.prompt-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Floating Prompt */
.floating-prompt-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}

.floating-prompt-content {
  position: relative;
  max-width: 80%;
  max-height: 60%;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.floating-prompt-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.floating-prompt-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.floating-prompt-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  text-align: center;
  max-width: 500px;
  word-break: break-word;
}

.floating-prompt-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.floating-prompt-copy {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.floating-prompt-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Detail modal footer - 玻璃效果 */
.detail-modal-footer-glass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px 24px;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-info-section {
  text-align: center;
}

.detail-prompt-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 80%;
}

.detail-prompt {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  line-height: 1.5;
  word-break: break-word;
}

.detail-prompt-loading,
.detail-prompt-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

.detail-copy-btn {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
  white-space: nowrap;
}

.detail-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Detail info grid */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-info-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-info-value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 信息内容 - 改进的布局 */
.modal-info-content {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius-md);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 信息区块 - 带边框和间距 */
.info-section {
  padding: 16px;
  border: 1px solid #eee;
  border-radius: var(--radius-md);
  background: #fafafa;
}

/* 提示词区域 - 特殊样式 */
.prompt-section {
  background: #fffbeb;
  border-color: #fcd34d;
}

.prompt-section .info-label {
  color: #92400e;
  font-weight: 600;
}

.prompt-row {
  padding: 0;
  background: transparent;
  margin-bottom: 12px;
}

.info-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  display: block;
  font-weight: 500;
}

.prompt-value {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: block;
}

/* 复制按钮 */
.copy-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
  transition: var(--transition);
}

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

.info-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 0;
  font-size: 14px;
  gap: 4px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-value {
  color: var(--text-primary);
  word-break: break-all;
}

.info-value a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

.info-value-break {
  word-break: break-all;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 12px;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 4px;
  display: inline-block;
}

/* 底部操作栏 */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  gap: 8px;
}

/* Simple footer for image viewer */
.modal-footer-simple {
  justify-content: center;
  gap: 20px;
}

.modal-footer-left,
.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-info {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.modal-favorite {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  padding: 8px;
}

.modal-favorite:hover {
  color: rgba(255, 255, 255, 0.9);
}

.modal-favorite:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.modal-favorite.active {
  color: #f1c40f;
}

.modal-delete {
  padding: 10px 20px;
  background: var(--danger-light);
  color: var(--danger-color);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.modal-delete:hover {
  background: var(--danger-color);
  color: white;
}

.modal-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Zoom controls */
.zoom-control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.zoom-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.zoom-level {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  min-width: 48px;
  text-align: center;
}

/* Zoom indicator */
.zoom-indicator {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0.8;
}

/* Navigation arrows - always visible on desktop */
.modal-nav {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.modal-nav.hidden {
  display: none;
}

/* Mobile: subtle arrows */
@media (max-width: 768px) {
  .modal-nav {
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.3);
  }

  .modal-nav:hover {
    opacity: 0.8;
  }
}

/* 移动端适配 */
@media (max-width: 640px) {
  .gallery-toolbar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .toolbar-left {
    width: 100%;
    justify-content: center;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .modal-content {
    max-height: 95vh;
    margin: 10px;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .modal-nav-prev {
    left: 8px;
  }

  .modal-nav-next {
    right: 8px;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-body-image {
    padding: 50px 50px;
  }

  .modal-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .modal-footer-left,
  .modal-footer-right {
    width: 100%;
    justify-content: center;
  }

  .modal-info-content {
    padding: 16px;
  }

  .info-section {
    padding: 12px;
  }

  .detail-modal-content {
    max-height: 95vh;
  }
}

/* Login Form Styles */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #d299c2 100%);
}

.auth-container h1 {
  color: #2d3436;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 600;
}

.auth-container p {
  color: #636e72;
  margin-bottom: 32px;
  font-size: 14px;
}

.auth-container form {
  background: rgba(255, 255, 255, 0.95);
  padding: 48px 40px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.auth-container input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 16px;
  background: #f8f9fa;
  box-sizing: border-box;
}

.auth-container input:focus {
  outline: none;
  border-color: #5fb3a1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(95, 179, 161, 0.1);
}

.auth-container button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #5fb3a1 0%, #4a9e8c 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-container button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(95, 179, 161, 0.4);
}

.auth-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-container .error {
  background: #fadbd8;
  color: #e74c3c;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.auth-page {
  min-height: 100vh;
}
