/* ==================== CSS Reset ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent-hover);
}

/* ==================== Header ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.5s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.5s;
}

.theme-switcher {
  display: flex;
  gap: 0.5rem;
}

.theme-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  transform: scale(1.15);
  border-color: var(--accent-color);
}

.theme-btn.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ==================== Section Common ==================== */
.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
  transition: color 0.5s;
}

/* ==================== Banner ==================== */
.banner-section {
  margin-top: 60px; /* header height offset */
  position: relative;
  width: 100%;
  height: 65vh;
  min-height: 380px;
  max-height: 650px;
  overflow: hidden;
  background: var(--bg-secondary);
}

/* 高斯模糊全屏背景层 */
.banner-blur-bg {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.7) saturate(1.3);
  -webkit-filter: blur(30px) brightness(0.7) saturate(1.3);
  transform: scale(1.1);
  transition: background-image 0.8s ease;
  z-index: 0;
}

/* 限宽主图区域 - 与作品展示同宽 */
.banner-main {
  position: relative;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  z-index: 1;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease-out;
}

.banner-slide img:hover {
  transform: scale(1.03);
}

/* 网易云风格：全覆盖渐变遮罩 */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.15) 40%,
    rgba(0,0,0,0.25) 70%,
    rgba(0,0,0,0.5) 100%
  );
  color: #fff;
}

/* 优美句子 - 大字居中 */
.banner-quote {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  line-height: 1.6;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.3);
  margin-bottom: 2rem;
  max-width: 600px;
  opacity: 0;
  transform: translateY(20px);
  animation: bannerQuoteFadeIn 1s 0.3s forwards;
}

@keyframes bannerQuoteFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 作品信息 - 底部小字 */
.banner-info {
  position: absolute;
  bottom: 2.5rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.banner-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.8;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.banner-category {
  font-size: 0.75rem;
  opacity: 0.6;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}

/* 指示器 - 胶囊条形 */
.banner-indicators {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 10;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(6px);
  padding: 0.35rem 0.5rem;
  border-radius: 20px;
}

.banner-dot {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: all 0.4s ease;
}

.banner-dot.active {
  width: 32px;
  background: #fff;
  transform: none;
}

.banner-dot:hover {
  background: rgba(255,255,255,0.7);
}

/* ==================== Gallery Tabs ==================== */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.gallery-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--tab-radius, 25px);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.tab-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--accent-text);
}

/* ==================== Gallery Grid ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  cursor: pointer;
  border-radius: var(--card-radius, 8px);
  overflow: hidden;
  background: var(--bg-secondary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow, 0 8px 25px rgba(0,0,0,0.15));
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.6s ease;
  opacity: 0;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item .img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary) 25%, transparent 25%) -50px 0,
              linear-gradient(225deg, var(--bg-secondary) 25%, transparent 25%) -50px 0,
              linear-gradient(315deg, var(--bg-secondary) 25%, transparent 25%),
              linear-gradient(45deg, var(--bg-secondary) 25%, transparent 25%);
  animation: shimmer 1.5s infinite linear;
}

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

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-title {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

/* ==================== Artist Section ==================== */
.artist-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.artist-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  transition: border-color 0.5s;
}

.avatar-placeholder {
  font-size: 3rem;
}

.artist-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.artist-bio {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ==================== Quotes Section ==================== */
.quotes-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.quotes-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quote-item {
  text-align: center;
  padding: 1.5rem;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

.quote-text::before {
  content: '"';
  font-size: 2rem;
  color: var(--accent-color);
  margin-right: 0.2rem;
}

.quote-text::after {
  content: '"';
  font-size: 2rem;
  color: var(--accent-color);
  margin-left: 0.2rem;
}

.quote-author {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.quote-author::before {
  content: '—— ';
}

/* ==================== Footer ==================== */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: border-color 0.5s;
}

.footer-contact {
  margin-bottom: 0.5rem;
}

.footer-copyright {
  opacity: 0.7;
}

/* ==================== Lightbox ==================== */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2010;
  transition: transform 0.3s;
  line-height: 1;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  z-index: 2010;
  border-radius: 4px;
  transition: background 0.3s;
}

.lightbox-arrow:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 85vw;
  max-height: 85vh;
}

.lightbox-frame {
  padding: var(--frame-padding, 12px);
  background: var(--frame-bg, #fff);
  transition: all 0.5s ease;
}

.lightbox-img {
  max-width: 80vw;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.lightbox-title {
  margin-top: 1rem;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  text-align: center;
}

/* ==================== 梦幻粒子特效 ==================== */
.lightbox-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2001;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

/* 星星 - 白色发光圆点 */
.particle-star {
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.2) 60%, transparent 80%);
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.8), 0 0 15px 4px rgba(255,255,255,0.4), 0 0 30px 6px rgba(200,200,255,0.15);
}

/* 雪花 - 柔和白色 */
.particle-snow {
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.5) 40%, rgba(255,255,255,0.1) 70%, transparent 100%);
  box-shadow: 0 0 8px 2px rgba(255,255,255,0.3);
}

/* 星星动画 - 缓慢飘落 + 闪烁 */
@keyframes particleFallAndTwinkle {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(0) scale(0.5);
  }
  10% {
    opacity: var(--target-opacity);
    transform: translateX(calc(var(--drift) * 0.1)) translateY(5vh) scale(1);
  }
  30% {
    opacity: calc(var(--target-opacity) * 0.3);
    transform: translateX(calc(var(--drift) * 0.3)) translateY(15vh) scale(0.6);
  }
  50% {
    opacity: var(--target-opacity);
    transform: translateX(calc(var(--drift) * 0.5)) translateY(30vh) scale(1.2);
  }
  70% {
    opacity: calc(var(--target-opacity) * 0.4);
    transform: translateX(calc(var(--drift) * 0.7)) translateY(50vh) scale(0.7);
  }
  90% {
    opacity: var(--target-opacity);
    transform: translateX(calc(var(--drift) * 0.9)) translateY(75vh) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(var(--drift)) translateY(95vh) scale(0.3);
  }
}

/* 雪花动画 - 柔和飘落 */
@keyframes particleFallGentle {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(0);
  }
  15% {
    opacity: var(--target-opacity);
  }
  85% {
    opacity: var(--target-opacity);
  }
  100% {
    opacity: 0;
    transform: translateX(var(--drift)) translateY(90vh);
  }
}

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

@media (max-width: 768px) {
  .site-title {
    font-size: 1.2rem;
  }

  .banner-section {
    height: 50vh;
    min-height: 280px;
    border-radius: 0 0 12px 12px;
  }

  .banner-quote {
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    max-width: 85%;
  }

  .banner-info {
    bottom: 2rem;
    left: 1.2rem;
  }

  .banner-title {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .gallery-tabs {
    justify-content: flex-start;
    padding: 0 0.5rem 0.5rem;
  }

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .artist-card {
    padding: 0 1rem;
  }

  .lightbox-img {
    max-width: 95vw;
    max-height: 65vh;
  }

  .lightbox-arrow {
    font-size: 1.5rem;
    padding: 0.5rem 0.7rem;
  }
}
