/* ========================================
   小画家画廊 - 严格遵循 DESIGN.md 规范
   儿童艺术画展 · 马卡龙柔和色彩 · 梦幻童话风格
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Baloo+2:wght@500;600;700;800&family=ZCOOL+KuaiLe&display=swap');

/* === 1. 色彩系统 === */
:root {
  /* Primary Brand - 马卡龙色系 */
  --mint: #A8E6CF;
  --peach: #FFB7B2;
  --lemon: #FFEAA7;
  --sky: #87CEEB;
  --lavender: #DDA0DD;
  --coral: #FF6B6B;

  /* Neutral */
  --white: #FFFFFF;
  --cream: #FFF9F0;
  --light-gray: #F5F5F5;
  --medium-gray: #9E9E9E;
  --charcoal: #2D3436;

  /* Semantic */
  --success: #A8E6CF;
  --warning: #FFEAA7;
  --error: #FF6B6B;
  --info: #87CEEB;

  /* Typography */
  --font-primary: 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Baloo 2', 'ZCOOL KuaiLe', 'Microsoft Yahei', cursive;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing (8px base) */
  --sp1: 4px; --sp2: 8px; --sp3: 12px; --sp4: 16px;
  --sp5: 24px; --sp6: 32px; --sp7: 40px; --sp8: 48px;
  --sp9: 64px; --sp10: 80px;

  /* Border Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-1: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-2: 0 8px 30px rgba(0,0,0,0.06);
  --shadow-3: 0 20px 40px rgba(0,0,0,0.10);
  --shadow-4: 0 30px 60px rgba(0,0,0,0.15);

  /* Gradients */
  --grad-dream: linear-gradient(135deg, #A8E6CF 0%, #87CEEB 50%, #DDA0DD 100%);
  --grad-sunset: linear-gradient(135deg, #FFB7B2 0%, #FFEAA7 100%);
  --grad-rainbow: linear-gradient(90deg, #FF6B6B, #FFB7B2, #FFEAA7, #A8E6CF, #87CEEB, #DDA0DD);
  --grad-hero: linear-gradient(160deg, #FFF9F0 0%, #FFEAA7 20%, #A8E6CF 50%, #87CEEB 80%, #DDA0DD 100%);

  /* Easing */
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-playful: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 界面框架色（纯净白色+柔和马卡龙） */
  --bg: #FFFFFF;
  --bg-soft: #FFF9F0;
  --card-bg: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #9E9E9E;
}

/* === 2. 基础重置 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }
input, textarea, select { font-family: inherit; }

/* === 3. 动画关键帧 === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50% { opacity: 0.5; transform: scale(0.8) rotate(180deg); }
}
@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cloudFloat {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(15px) translateY(-8px); }
  50% { transform: translateX(5px) translateY(-15px); }
  75% { transform: translateX(-10px) translateY(-5px); }
}
@keyframes starPop {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(180deg); opacity: 1; }
  100% { transform: scale(1) rotate(360deg); opacity: 1; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* === 4. 导航栏 === */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--sp4) var(--sp8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(168, 230, 207, 0.3);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad-rainbow);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowShift 4s linear infinite;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: var(--sp2);
  align-items: center;
}

.nav-link {
  padding: var(--sp2) var(--sp5);
  border-radius: var(--r-full);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--coral);
  border-radius: 1px;
  transition: all 0.3s var(--ease-smooth);
}
.nav-link:hover::after,
.nav-link.active::after {
  left: var(--sp5);
  right: var(--sp5);
}
.nav-link:hover {
  color: var(--coral);
  transform: translateY(-1px);
}
.nav-link.active {
  background: linear-gradient(135deg, var(--coral), var(--peach));
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}
.nav-link.active::after { display: none; }

/* === 5. 按钮组件 === */

/* Primary - 胶囊渐变按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp2);
  padding: 14px 36px;
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--coral), var(--peach));
  border: none;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  cursor: pointer;
  transition: all 0.3s var(--ease-playful);
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.45);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* 3D展厅按钮 - 特殊渐变 */
.btn-3d {
  background: linear-gradient(135deg, #FF6B6B, #FFB7B2, #FFEAA7);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  position: relative;
  overflow: hidden;
}
.btn-3d::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255,255,255,0.3) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}
.btn-3d:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.5);
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* CTA 提示 */
.hero-cta-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.hint-badge {
  background: linear-gradient(135deg, var(--coral), var(--peach));
  color: white;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulseBadge 2s ease-in-out infinite;
}
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Secondary */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: var(--r-full);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--white);
  border: 2.5px solid var(--mint);
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}
.btn-secondary:hover {
  background: var(--mint);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 230, 207, 0.4);
}

/* Icon Button - 圆形 */
.btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(168, 230, 207, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-bounce);
}
.btn-icon:hover {
  background: var(--mint);
  transform: scale(1.1);
}

/* Small Button */
.btn-sm {
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 0.8rem;
  font-weight: 600;
}
.btn-danger {
  background: var(--error);
  color: white;
  border-radius: var(--r-md);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s var(--ease-smooth);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,107,0.4); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--peach);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s var(--ease-smooth);
}
.btn-outline:hover { background: var(--peach); color: white; transform: translateY(-1px); }

/* === 6. 卡片组件 === */

/* 作品卡片 */
.artwork-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-2);
  transition: all 0.4s var(--ease-playful);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s var(--ease-playful) both;
}
.artwork-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--grad-rainbow);
  background-size: 200% 100%;
  animation: rainbowShift 3s linear infinite;
}
.artwork-card:hover {
  transform: translateY(-10px) rotate(1deg);
  box-shadow: var(--shadow-3);
}

/* 时间轴卡片 */
.timeline-card {
  background: linear-gradient(135deg, rgba(168, 230, 207, 0.12), rgba(135, 206, 235, 0.12));
  border-radius: var(--r-lg);
  padding: 24px;
  border: 2px dashed rgba(168, 230, 207, 0.5);
  position: relative;
  transition: all 0.3s var(--ease-smooth);
}
.timeline-card:hover {
  border-color: var(--coral);
  box-shadow: var(--shadow-2);
}

/* 普通卡片 */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: all 0.3s var(--ease-smooth);
}
.card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-4px);
}

/* === 7. 拖拽上传区 === */
.upload-zone {
  border: 3px dashed var(--mint);
  border-radius: var(--r-xl);
  padding: 60px 40px;
  background: linear-gradient(135deg, rgba(168, 230, 207, 0.05), rgba(255, 183, 178, 0.05));
  text-align: center;
  transition: all 0.3s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.upload-zone::before {
  content: '☁️';
  font-size: 80px;
  display: block;
  margin-bottom: 20px;
  animation: cloudFloat 4s ease-in-out infinite;
  line-height: 1;
}
.upload-zone:hover {
  border-color: var(--coral);
  background: linear-gradient(135deg, rgba(255, 183, 178, 0.1), rgba(255, 234, 167, 0.1));
  transform: scale(1.01);
}
.upload-zone.drag-over {
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.08);
  transform: scale(1.02);
}
.upload-zone-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp2);
}
.upload-zone-hint {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* === 8. 页面结构 === */

/* Hero 区域 */
.hero {
  min-height: 100vh;
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px var(--sp6) var(--sp10);
  position: relative;
  overflow: hidden;
}

/* 装饰性云朵和星星 */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  /* 云朵装饰 */
  width: 300px; height: 200px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.6) 0%, transparent 70%);
  top: 10%; left: -5%;
  animation: cloudFloat 8s ease-in-out infinite;
}
.hero::after {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
  bottom: 15%; right: 5%;
  animation: cloudFloat 10s ease-in-out infinite reverse;
}

/* Hero 内容 */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  animation: fadeInUp 0.8s var(--ease-playful);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp2);
  padding: 8px 20px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: var(--sp5);
  border: 1px solid rgba(255,107,107,0.2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.15;
  margin-bottom: var(--sp4);
  letter-spacing: -0.02em;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--coral), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp6);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.hero-cta {
  display: flex;
  gap: var(--sp4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp8);
}

/* 主人公信息 */
.hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp4);
  margin-top: var(--sp5);
  animation: fadeInUp 0.8s 0.2s var(--ease-playful) both;
}

.hero-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--white);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transition: all 0.4s var(--ease-playful);
  position: relative;
}
.hero-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 40px rgba(255,107,107,0.2);
}
.hero-avatar-wrap {
  position: relative;
}
.hero-avatar-wrap::before {
  content: '✨';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.5rem;
  animation: twinkle 2s ease-in-out infinite;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.8;
  padding: 16px 28px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
  border: 1px solid rgba(168,230,207,0.3);
}

/* 统计数字 */
.hero-stats {
  display: flex;
  gap: var(--sp5);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--sp7);
  animation: fadeInUp 0.8s 0.4s var(--ease-playful) both;
}

.stat-pill {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
  padding: 20px 32px;
  text-align: center;
  border: 1px solid rgba(255,183,178,0.3);
  box-shadow: var(--shadow-1);
  transition: all 0.3s var(--ease-playful);
  min-width: 120px;
}
.stat-pill:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: var(--shadow-3);
}
.stat-pill .stat-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--coral), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  display: block;
}
.stat-pill .stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* 滚动指示 */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.8rem;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-hint::after {
  content: '↓';
  font-size: 1.2rem;
  animation: bounce 2s ease-in-out infinite;
}

/* === 9. 画廊页面 === */
.gallery-page {
  padding-top: 80px;
  min-height: 100vh;
  background: var(--cream);
}

.gallery-header {
  padding: var(--sp10) var(--sp6) var(--sp7);
  text-align: center;
  background: var(--cream);
  position: relative;
}
.gallery-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: var(--sp3);
}
.gallery-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* 年龄筛选 */
.filter-bar {
  display: flex;
  gap: var(--sp3);
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--sp5);
  max-width: 900px;
  margin: 0 auto;
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(255,249,240,0.9);
  backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
}
.filter-btn {
  padding: 10px 22px;
  border-radius: var(--r-full);
  border: 2px solid var(--mint);
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover {
  background: rgba(168, 230, 207, 0.15);
  border-color: var(--mint);
  transform: translateY(-2px);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--mint), var(--sky));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(168, 230, 207, 0.4);
}
.filter-btn .count-badge {
  background: rgba(255,255,255,0.4);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
}
.filter-btn:not(.active) .count-badge {
  background: rgba(0,0,0,0.06);
  color: var(--text-secondary);
}

/* 作品网格 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp5);
  padding: var(--sp5) max(var(--sp5), calc((100vw - 1200px) / 2));
  max-width: 1400px;
  margin: 0 auto;
}

.work-card {
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: all 0.4s var(--ease-playful);
  position: relative;
  animation: fadeInUp 0.5s var(--ease-playful) both;
}
.work-card:hover {
  transform: translateY(-8px) rotate(0.5deg);
  box-shadow: var(--shadow-3);
}
.work-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  background: var(--cream);
  transition: transform 0.4s var(--ease-smooth);
}
.work-card:hover img {
  transform: scale(1.04);
}
.work-info {
  padding: 18px 20px;
}
.work-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.3;
}
.work-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.work-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.work-tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: rgba(255, 183, 178, 0.2);
  color: var(--coral);
  font-weight: 600;
}

/* 画廊空状态 */
.gallery-empty {
  text-align: center;
  padding: var(--sp10);
  color: var(--text-light);
  font-size: 1.1rem;
  grid-column: 1 / -1;
}
.gallery-empty::before {
  content: '🎨';
  font-size: 4rem;
  display: block;
  margin-bottom: var(--sp4);
  animation: float 3s ease-in-out infinite;
}

/* 3D展厅入口 */
.immersive-entry {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}
.immersive-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  background: linear-gradient(135deg, rgba(168, 230, 207, 0.2), rgba(255, 183, 178, 0.2));
  border: 2px dashed var(--mint);
  border-radius: var(--r-xl);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 400px;
  width: 100%;
}
.immersive-btn:hover {
  background: linear-gradient(135deg, rgba(168, 230, 207, 0.3), rgba(255, 183, 178, 0.3));
  border-color: var(--coral);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(168, 230, 207, 0.3);
}
.immersive-icon {
  font-size: 2.5rem;
  animation: float 2s ease-in-out infinite;
}
.immersive-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
}
.immersive-text strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.immersive-text small {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.immersive-arrow {
  font-size: 1.5rem;
  color: var(--coral);
  transition: transform 0.3s ease;
}
.immersive-btn:hover .immersive-arrow {
  transform: translateX(8px);
}

/* === 10. 作品详情弹窗 === */
.work-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(45, 52, 54, 0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: var(--sp6);
}
.work-modal.open {
  display: flex;
  animation: fadeInUp 0.3s var(--ease-playful);
}
.work-modal-content {
  background: var(--white);
  border-radius: var(--r-2xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  box-shadow: var(--shadow-4);
}
.work-modal img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  background: var(--cream);
}
.work-modal-body {
  padding: var(--sp6);
}
.work-modal-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--charcoal);
  margin-bottom: var(--sp3);
}
.work-modal-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: var(--sp4);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.work-modal-desc {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}
.work-modal-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 201;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.work-modal-close:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.1) rotate(90deg);
}

/* 弹窗大图旋转控制 */
.modal-rotate-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 18px 0 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease-playful), transform 0.3s var(--ease-playful);
}
.work-modal.open .modal-rotate-wrap {
  opacity: 1;
  transform: translateY(0);
}
.modal-rotate-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  font-family: var(--font-primary);
}
.modal-rotate-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s ease;
}
.modal-rotate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
/* 左旋按钮 - 薄荷绿渐变 */
.modal-rotate-btn.left {
  background: linear-gradient(135deg, #A8E6CF, #7dd3b8);
  box-shadow: 0 4px 16px rgba(168, 230, 207, 0.5);
}
.modal-rotate-btn.left:hover {
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 8px 24px rgba(168, 230, 207, 0.65);
}
.modal-rotate-btn.left:active {
  transform: scale(0.95) rotate(-10deg);
}
/* 右旋按钮 - 蜜桃粉渐变 */
.modal-rotate-btn.right {
  background: linear-gradient(135deg, #FFB7B2, #ff8f88);
  box-shadow: 0 4px 16px rgba(255, 183, 178, 0.5);
}
.modal-rotate-btn.right:hover {
  transform: scale(1.12) rotate(6deg);
  box-shadow: 0 8px 24px rgba(255, 183, 178, 0.65);
}
.modal-rotate-btn.right:active {
  transform: scale(0.95) rotate(10deg);
}
.modal-rotate-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}


/* === 11. 专辑展示区 === */
.albums-section {
  padding: var(--sp9) var(--sp6);
  background: var(--cream);
}

.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--charcoal);
  margin-bottom: var(--sp7);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--grad-sunset);
  border-radius: 2px;
  margin: var(--sp3) auto 0;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp5);
  max-width: 1200px;
  margin: 0 auto;
}

.album-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp6) var(--sp5);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: all 0.4s var(--ease-playful);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp3);
  min-height: 220px;
  justify-content: center;
}
.album-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--grad-rainbow);
  background-size: 200% 100%;
  animation: rainbowShift 3s linear infinite;
}
.album-card:nth-child(1) { border-top: 5px solid var(--peach); }
.album-card:nth-child(2) { border-top: 5px solid var(--mint); }
.album-card:nth-child(3) { border-top: 5px solid var(--lemon); }
.album-card:nth-child(4) { border-top: 5px solid var(--lavender); }
.album-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: var(--shadow-3);
}
.album-icon { font-size: 3.5rem; line-height: 1; }
.album-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
}
.album-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.album-count {
  font-size: 0.75rem;
  color: var(--text-light);
  background: rgba(221,160,221,0.15);
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-weight: 600;
}

/* 专辑空状态 */
.album-card.gallery-empty {
  border: 2px dashed rgba(168,230,207,0.4);
  background: rgba(168,230,207,0.05);
}

/* === 12. 底部 === */
.footer {
  text-align: center;
  padding: var(--sp7) var(--sp6);
  color: var(--text-light);
  font-size: 0.875rem;
  background: linear-gradient(180deg, transparent, rgba(168,230,207,0.08));
  border-top: 1px solid rgba(168,230,207,0.2);
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--coral);
}
.footer::before {
  content: '🌈';
  display: block;
  font-size: 1.5rem;
  margin-bottom: var(--sp3);
}

/* === 13. 管理后台 === */
.admin-page {
  display: flex;
  min-height: 100vh;
  background: #F8F5FC;
}

.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #2D1B4E, #4A2C7A);
  color: #fff;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: var(--sp5) 0;
}

.sidebar-logo {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 0 var(--sp5) var(--sp5);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--sp4);
  color: white;
}
.sidebar-logo .accent { color: var(--peach); }

.admin-nav-item {
  padding: 14px var(--sp5);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-left: 3px solid transparent;
  transition: all 0.3s var(--ease-smooth);
}
.admin-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.admin-nav-item.active {
  background: rgba(255,107,107,0.2);
  border-left-color: var(--coral);
  color: white;
  font-weight: 600;
}
.admin-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: var(--sp6);
}

.admin-panel {
  display: none;
  animation: fadeInUp 0.4s var(--ease-smooth);
}
.admin-panel.active {
  display: block;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp6);
  flex-wrap: wrap;
  gap: var(--sp4);
}
.admin-panel-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
}

/* 后台统计 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp4);
  margin-bottom: var(--sp6);
}
.admin-stat-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp5);
  box-shadow: var(--shadow-1);
  border-top: 4px solid transparent;
}
.admin-stat-card:nth-child(1) { border-top-color: var(--coral); }
.admin-stat-card:nth-child(2) { border-top-color: var(--peach); }
.admin-stat-card:nth-child(3) { border-top-color: var(--mint); }
.admin-stat-card:nth-child(4) { border-top-color: var(--sky); }
.admin-stat-card:nth-child(5) { border-top-color: var(--lavender); }
.admin-stat-card .stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--charcoal);
  display: block;
  line-height: 1;
}
.admin-stat-card .stat-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 500;
}

/* 最近上传 */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp4);
  margin-bottom: var(--sp6);
}
.recent-card {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: all 0.3s var(--ease-smooth);
}
.recent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.recent-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--cream);
}
.recent-card .rc-info { padding: 10px 12px; }
.recent-card .rc-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--charcoal);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-card .rc-date { font-size: 0.75rem; color: var(--text-light); }

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.data-table th {
  background: linear-gradient(135deg, var(--coral), var(--peach));
  color: white;
  padding: 16px 18px;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 0.875rem;
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,183,178,0.04); }
.work-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 2px solid rgba(255,183,178,0.2);
}
.status-badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.status-published {
  background: rgba(168,230,207,0.2);
  color: #2D8A4E;
}
.status-draft {
  background: rgba(255,234,167,0.2);
  color: #8A6B00;
}

/* 专辑管理卡片 */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp4);
}
.album-admin-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp5);
  box-shadow: var(--shadow-1);
  border-top: 5px solid var(--peach);
  transition: all 0.3s var(--ease-smooth);
}
.album-admin-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.album-admin-card .aac-icon { font-size: 2.5rem; text-align: center; margin-bottom: 8px; }
.album-admin-card h4 { font-family: var(--font-display); font-size: 1.1rem; color: var(--charcoal); margin-bottom: 6px; }
.album-admin-card p { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; }
.aac-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 模态框 */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(45,52,54,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: var(--sp6);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp6);
  box-shadow: var(--shadow-4);
  position: relative;
}
.modal h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--charcoal);
  margin-bottom: var(--sp5);
  padding-right: 40px;
}
.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light-gray);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s;
}
.modal-close-btn:hover { background: var(--coral); color: white; }
.form-group { margin-bottom: var(--sp4); }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: var(--r-md);
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-smooth);
  background: var(--white);
  color: var(--charcoal);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp3); }
.modal-actions {
  display: flex;
  gap: var(--sp3);
  justify-content: flex-end;
  margin-top: var(--sp5);
  padding-top: var(--sp4);
  border-top: 1px solid var(--light-gray);
}
.preview-img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--r-md);
  margin-top: 10px;
  background: var(--cream);
}

.rotate-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 登录弹窗 */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: linear-gradient(135deg, rgba(45,27,78,0.9), rgba(74,44,122,0.9));
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
}
.login-overlay.open { display: flex; }
.login-box {
  background: var(--white);
  border-radius: var(--r-2xl);
  padding: var(--sp8);
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-4);
  animation: fadeInUp 0.4s var(--ease-playful);
}
.login-box h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--charcoal);
  margin-bottom: var(--sp3);
}
.login-box .login-hint {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: var(--sp5);
}
.login-box .form-group { text-align: left; }
.login-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-bottom: var(--sp3);
  display: none;
  padding: 10px;
  background: rgba(255,107,107,0.1);
  border-radius: var(--r-sm);
}
.login-box .btn-primary { width: 100%; }

/* 设置页 */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp5);
}
.settings-section {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp5);
  box-shadow: var(--shadow-1);
}
.settings-section h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: var(--sp4);
  padding-bottom: var(--sp3);
  border-bottom: 2px solid var(--peach);
}
.avatar-upload {
  display: flex;
  align-items: center;
  gap: var(--sp4);
}
.avatar-upload img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--peach);
}
.color-picker-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s var(--ease-bounce);
}
.color-swatch:hover,
.color-swatch.active {
  border-color: var(--charcoal);
  transform: scale(1.15);
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--charcoal);
  color: white;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 0.95rem;
  font-weight: 600;
  z-index: 500;
  opacity: 0;
  transition: all 0.4s var(--ease-bounce);
  pointer-events: none;
  box-shadow: var(--shadow-3);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === 14. 响应式设计 === */
@media (max-width: 1024px) {
  .albums-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-container { padding: var(--sp3) var(--sp4); }
  .nav-brand { font-size: 1.1rem; }
  .nav-link { padding: 6px 14px; font-size: 0.85rem; }
  .hero { padding: 90px 20px 60px; }
  .hero-title { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .hero-stats { gap: var(--sp3); }
  .stat-pill { padding: 14px 20px; min-width: 90px; }
  .stat-pill .stat-num { font-size: 1.8rem; }
  .albums-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp4); }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp4); }
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; padding: var(--sp4); }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

@media (max-width: 640px) {
  .albums-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .form-row { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .filter-bar { top: 68px; }
}

/* === 15. 加载动画 === */
.loading-shimmer {
  background: linear-gradient(90deg, var(--light-gray) 25%, #e8e8e8 50%, var(--light-gray) 75%);
  background-size: 200% auto;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--r-md);
}
