/* ===== 奢华世界模型画廊 - 完整样式 ===== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Source+Serif+Pro:wght@400;600;700&display=swap');

/* ===== CSS 变量 - 多主题支持 ===== */
:root {
  /* 奢华黑金主题 (默认) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #15151e;
  --bg-elevated: #181822;
  
  --gold-100: #f8e7a8;
  --gold-200: #e8d488;
  --gold-300: #d4b856;
  --gold-400: #b89a2e;
  --gold-500: #8a721a;
  
  --text-primary: #f8f4e8;
  --text-secondary: #a8a090;
  --text-muted: #6a6458;
  
  --border-subtle: rgba(212, 184, 86, 0.1);
  --border-medium: rgba(212, 184, 86, 0.2);
  --border-strong: rgba(212, 184, 86, 0.4);
  
  --shadow-gold: 0 0 40px rgba(212, 184, 86, 0.1);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 赛博霓虹主题 */
[data-theme="cyber"] {
  --bg-primary: #0a0512;
  --bg-secondary: #12081f;
  --bg-card: #150a25;
  --bg-elevated: #1a0d2e;
  
  --gold-100: #ff9ff3;
  --gold-200: #ff6bcb;
  --gold-300: #ff006e;
  --gold-400: #be005a;
  --gold-500: #7d003c;
  
  --text-primary: #ffffff;
  --text-secondary: #b8b8ff;
  --text-muted: #6b6b9a;
  
  --border-subtle: rgba(255, 0, 110, 0.1);
  --border-medium: rgba(255, 0, 110, 0.2);
  --border-strong: rgba(255, 0, 110, 0.4);
  
  --shadow-gold: 0 0 40px rgba(255, 0, 110, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* 极简白银主题 */
[data-theme="minimal"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f0f0f0;
  --bg-card: #ffffff;
  --bg-elevated: #f5f5f5;
  
  --gold-100: #8a8a8a;
  --gold-200: #6a6a6a;
  --gold-300: #4a4a4a;
  --gold-400: #2a2a2a;
  --gold-500: #1a1a1a;
  
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  
  --border-subtle: rgba(74, 74, 74, 0.1);
  --border-medium: rgba(74, 74, 74, 0.2);
  --border-strong: rgba(74, 74, 74, 0.3);
  
  --shadow-gold: 0 0 40px rgba(74, 74, 74, 0.08);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Serif Pro', serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ===== 背景装饰 ===== */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orbit {
  position: absolute;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  opacity: 0.3;
  animation: orbitRotate 60s linear infinite;
}

.orbit-1 {
  width: 800px;
  height: 800px;
  top: -200px;
  right: -200px;
  animation-direction: reverse;
}

.orbit-2 {
  width: 600px;
  height: 600px;
  bottom: -100px;
  left: -100px;
  animation-duration: 45s;
}

.orbit-3 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 主应用 ===== */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 顶部导航 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border-subtle);
  /*padding: 1.5rem 2rem;*/
}

.header-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.brand-title {
  font-size: 2rem;
  font-weight: 800;
  font-family: SimSun, "宋体", serif;
  background: linear-gradient(135deg, var(--gold-200), var(--gold-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* 头部创建按钮 */
.header-create-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(212, 184, 86, 0.3);
  transition: var(--transition-bounce);
  color: #0a0a0f;
  font-family: 'Source Serif Pro', serif;
  font-size: 1rem;
  font-weight: 700;
}

.header-create-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 48px rgba(212, 184, 86, 0.4);
}

.header-create-btn .fab-icon {
  width: 20px;
  height: 20px;
}


/* ===== 画廊主区域 ===== */
.gallery-main {
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* 统计信息 */
.gallery-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 1.5rem 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  animation: statsFadeIn 0.6s ease-out;
}

@keyframes statsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-200), var(--gold-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* 画廊容器 */
.gallery-container {
  position: relative;
}

/* 网格布局 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* 画廊卡片 */
.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-gold), var(--shadow-elevated);
  border-color: var(--border-strong);
}

.gallery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.gallery-card:hover::before {
  opacity: 1;
}

.card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.card-image-placeholder svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  opacity: 0.3;
}

.gallery-card:hover .card-image img {
  transform: scale(1.08);
}

.card-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.status-generating {
  background: rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
  animation: statusPulse 2s ease-in-out infinite;
}

.status-ready {
  background: rgba(6, 182, 212, 0.25);
  color: #67e8f9;
}

.status-failed {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.card-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 1.5em;
}

.card-prompt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
  min-height: 2.8em;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-card:hover .card-actions {
  opacity: 1;
}

.card-action-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-medium);
  background: var(--bg-elevated);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.card-action-btn:hover {
  border-color: var(--gold-300);
  color: var(--gold-300);
  background: rgba(212, 184, 86, 0.1);
}

/* 加载更多 */
.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
}

.load-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--gold-300);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.load-more span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 空画廊 */
.empty-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  text-align: center;
  animation: emptyFadeIn 0.8s ease-out;
}

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

.empty-icon {
  width: 200px;
  height: 200px;
  margin-bottom: 2rem;
  animation: emptyFloat 4s ease-in-out infinite;
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-gallery h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.empty-gallery p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 400px;
}


/* ===== 弹窗遮罩 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
  animation: overlayFadeIn 0.3s ease-out;
}

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

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

/* 创建弹窗 */
.modal-create {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.modal-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.modal-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Source Serif Pro', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.modal-tab svg {
  width: 18px;
  height: 18px;
}

.modal-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.modal-tab.active {
  color: var(--gold-300);
  background: var(--bg-card);
}

.modal-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.create-form {
  display: none;
}

.create-form.active {
  display: block;
  animation: formFadeIn 0.3s ease-out;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  font-family: 'Source Serif Pro', serif;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold-300);
  box-shadow: 0 0 0 4px rgba(212, 184, 86, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.suggestion-tag {
  padding: 0.375rem 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.suggestion-tag:hover {
  border-color: var(--gold-300);
  color: var(--gold-300);
  background: rgba(212, 184, 86, 0.1);
}

.form-options {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-medium);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  border-color: var(--gold-300);
}

.checkbox-custom::after {
  content: '';
  width: 10px;
  height: 5px;
  border: 2px solid #0a0a0f;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  opacity: 1;
}

.checkbox-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 上传区域 */
.upload-zone {
  position: relative;
  border: 2px dashed var(--border-medium);
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--bg-secondary);
  margin-bottom: 1.5rem;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--gold-300);
  background: rgba(212, 184, 86, 0.05);
}

.upload-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.25rem;
}

.upload-text {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.upload-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.upload-preview {
  position: relative;
}

.upload-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
}

.upload-clear {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition-smooth);
}

.upload-clear:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-subtle);
}

/* 按钮 */
.btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Source Serif Pro', serif;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  color: #0a0a0f;
  box-shadow: 0 4px 16px rgba(212, 184, 86, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 184, 86, 0.4);
}

.btn-loader {
  display: flex;
  gap: 0.25rem;
}

.loader-dot {
  width: 6px;
  height: 6px;
  background: #0a0a0f;
  border-radius: 50%;
  animation: loaderBounce 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loaderBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ===== 查看器弹窗 ===== */
.modal-viewer {
  background: #000;
  border-radius: 20px;
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 全屏模式 */
.modal-viewer.fullscreen {
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

.viewer-container {
  flex: 1;
  position: relative;
  background: #000;
  min-height: 500px;
  width: 100%;
}

/* 右上角按钮组（全屏+关闭）*/
.viewer-controls-top-right {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 184, 86, 0.2);
  animation: controlsFadeIn 0.3s ease-out;
}

.viewer-control-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(20, 20, 30, 0.8);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.viewer-control-btn:hover {
  color: var(--text-primary);
  background: rgba(40, 40, 60, 0.9);
  border-color: var(--gold-300);
}

.viewer-control-btn svg {
  width: 20px;
  height: 20px;
}

/* 左上角粒子效果控制 */
.viewer-controls-top-left {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  display: flex;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 184, 86, 0.2);
  animation: controlsFadeIn 0.3s ease-out;
}

#viewer-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.viewer-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 10; /* 确保在 canvas 上方 */
  background: rgba(0, 0, 0, 0.7); /* 添加半透明背景 */
  padding: 2rem 3rem;
  border-radius: 16px;
  border: 1px solid var(--border-medium);
}

.progress-track {
  width: 300px;
  height: 12px;
  background: rgba(40, 40, 50, 0.8);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-300), var(--gold-200));
  width: 0%;
  transition: width 0.2s ease-out;
  box-shadow: 0 0 12px rgba(212, 184, 86, 0.6);
}

.progress-text {
  color: var(--gold-100);
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* 粒子效果控制面板 */
@keyframes controlsFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.particle-select {
  padding: 0.5rem 1rem;
  background: rgba(20, 20, 30, 0.8);
  border: 1px solid rgba(212, 184, 86, 0.3);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Source Serif Pro', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}

.particle-select:hover {
  border-color: var(--gold-300);
  background: rgba(40, 40, 60, 0.9);
}

.particle-select:focus {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(212, 184, 86, 0.2);
}
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-secondary);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.param-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 184, 86, 0.4);
  transition: var(--transition-smooth);
}

.param-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(212, 184, 86, 0.6);
}

.param-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(212, 184, 86, 0.4);
  transition: var(--transition-smooth);
}

.param-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(212, 184, 86, 0.6);
}

/* ===== 通知提示 ===== */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-card);
  animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: #22c55e;
}

.toast.error .toast-icon {
  color: #ef4444;
}

.toast.info .toast-icon {
  color: #3b82f6;
}

.toast-message {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* ===== 响应式 ===== */
@media (max-width: 1400px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .header-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .header-content {
    padding: 0 1rem;
  }
}

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

  .header {
    padding: 1rem;
  }

  .header-content {
    padding: 0 0.5rem;
  }

  .gallery-main {
    padding: 1rem;
  }

  .header-create-btn {
    padding: 0.75rem 1.25rem;
  }

  .header-create-btn .fab-label {
    display: none;
  }

  .modal-overlay {
    padding: 1rem;
  }

  .modal-header,
  .modal-tabs,
  .modal-content,
  .modal-footer {
    padding: 1.25rem;
  }
}