/* ============================================================
   common.css — 全局公共样式
   流体渐变背景、香氛波纹点击动效、磨砂通用卡片、
   潮汐哑光导航、曲线分割层、视频容器样式、全局基础渐入动画
   ============================================================ */

/* === CSS Variables === */
:root {
  --color-primary: #4A7B9B;
  --color-accent: #7BA0C2;
  --color-accent-text: #5C829F;
  --color-bg: #F4F7FA;
  --color-text: #2C3440;
  --color-text-light: #5A6678;
  --color-white: #ffffff;
  --color-fluid-1: #E2EAF3;
  --color-fluid-2: #D6E2F0;
  --color-fluid-3: #EAF0F6;
  --color-metal: rgba(74, 123, 155, 0.35);
  --color-metal-hover: rgba(74, 123, 155, 0.6);
  --shadow-card: 0 4px 24px rgba(74, 123, 155, 0.1);
  --shadow-card-hover: 0 12px 40px rgba(74, 123, 155, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-xl: 40px;
  --font-lg: 26px;
  --font-md: 16px;
  --font-sm: 14px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === 三层流动流体渐变背景 === */
.fluid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
}

.fluid-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  filter: blur(80px);
}

.fluid-layer-1 {
  background: radial-gradient(ellipse at 30% 20%, var(--color-fluid-1) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, var(--color-fluid-1) 0%, transparent 60%);
  animation: fluidMove1 18s ease-in-out infinite;
}

.fluid-layer-2 {
  background: radial-gradient(ellipse at 60% 30%, var(--color-fluid-2) 0%, transparent 55%),
              radial-gradient(ellipse at 20% 70%, var(--color-fluid-2) 0%, transparent 55%);
  animation: fluidMove2 22s ease-in-out infinite;
}

.fluid-layer-3 {
  background: radial-gradient(ellipse at 50% 50%, var(--color-fluid-3) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 30%, var(--color-fluid-3) 0%, transparent 55%);
  animation: fluidMove3 20s ease-in-out infinite;
}

@keyframes fluidMove1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(3%, -2%) scale(1.05); }
  50% { transform: translate(-1%, 3%) scale(1.02); }
  75% { transform: translate(2%, 1%) scale(1.04); }
}

@keyframes fluidMove2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-3%, 2%) scale(1.03); }
  66% { transform: translate(2%, -3%) scale(1.05); }
}

@keyframes fluidMove3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2%, -1%) scale(1.04); }
}

/* 移动端简化流体 */
@media (max-width: 768px) {
  .fluid-layer {
    filter: blur(50px);
    opacity: 0.3;
  }
  .fluid-layer-1 { animation-duration: 30s; }
  .fluid-layer-2 { animation-duration: 35s; }
  .fluid-layer-3 { animation-duration: 32s; }
}

/* === 香氛波纹点击动效 === */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 160, 194, 0.5) 0%, rgba(123, 160, 194, 0.15) 50%, transparent 70%);
  transform: scale(0);
  animation: rippleExpand 1.2s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes rippleExpand {
  0% { transform: scale(0); opacity: 0.8; }
  100% { transform: scale(4); opacity: 0; }
}

/* === 全局渐入动画 === */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
}

/* 逐区块延迟淡入 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* === 细金属花枝线条扫过动画 === */
.metal-line-sweep {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.metal-line-sweep::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  transform: translateX(-100%);
  animation: lineSweep 3s ease-in-out infinite;
}

@keyframes lineSweep {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* === 哑光磨砂潮汐导航栏 === */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-smooth);
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.site-nav.scrolled {
  background: rgba(244, 247, 250, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(74, 123, 155, 0.08);
  padding: 10px 0;
}

.site-nav .nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav .nav-brand {
  font-size: 20px;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 2px;
  text-decoration: none;
  position: relative;
}

.site-nav .nav-brand::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.site-nav .nav-brand:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search input {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 123, 155, 0.2);
  border-radius: 24px;
  padding: 8px 16px 8px 36px;
  font-size: var(--font-sm);
  font-weight: 300;
  color: var(--color-text);
  outline: none;
  width: 200px;
  transition: all var(--transition-smooth);
  font-family: inherit;
}

.nav-search input:focus {
  width: 260px;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(74, 123, 155, 0.08);
}

.nav-search input::placeholder {
  color: var(--color-accent-text);
  opacity: 0.6;
}

.nav-search .search-icon {
  position: absolute;
  left: 14px;
  color: var(--color-accent-text);
  font-size: 14px;
  pointer-events: none;
}

.nav-filter-btn {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 123, 155, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 18px;
  transition: all var(--transition-smooth);
}

.nav-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(74, 123, 155, 0.08);
}

.nav-back-btn {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 123, 155, 0.2);
  border-radius: 24px;
  padding: 8px 18px;
  cursor: pointer;
  color: var(--color-primary);
  font-size: var(--font-sm);
  font-weight: 300;
  transition: all var(--transition-smooth);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.nav-back-btn:hover {
  border-color: var(--color-primary);
  background: rgba(74, 123, 155, 0.06);
}

/* === 通用磨砂卡片 === */
.matte-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(74, 123, 155, 0.12);
  border-radius: var(--radius-md);
  transition: all var(--transition-smooth);
  overflow: hidden;
}

.matte-card:hover {
  border-color: rgba(74, 123, 155, 0.35);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* === 曲线分割层 === */
.curve-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.curve-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

.curve-divider-top svg {
  transform: rotate(180deg);
}

/* === 视频容器通用样式 === */
.video-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(74, 123, 155, 0.12);
  transition: all var(--transition-smooth);
}

.video-wrapper:hover {
  border-color: rgba(74, 123, 155, 0.4);
}

.video-wrapper video {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(74, 123, 155, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-smooth);
  z-index: 5;
}

.video-play-overlay i {
  color: var(--color-primary);
  font-size: 24px;
  margin-left: 4px;
}

.video-play-overlay:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--color-accent);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* === 回到顶部按钮 === */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(74, 123, 155, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  z-index: 999;
  color: var(--color-primary);
  font-size: 18px;
  overflow: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 123, 155, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0.8);
  animation: ripplePulse 3s ease-in-out infinite;
}

.back-to-top:hover {
  border-color: var(--color-primary);
  background: rgba(74, 123, 155, 0.08);
}

@keyframes ripplePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* === 悬浮侧边抽屉 === */
.side-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(51, 56, 64, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.side-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 340px;
  max-width: 85vw;
  height: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-left: 1px solid rgba(74, 123, 155, 0.12);
  z-index: 2001;
  padding: 32px 24px;
  overflow-y: auto;
  transition: right var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.side-drawer.open {
  right: 0;
}

.side-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 123, 155, 0.12);
}

.side-drawer-title {
  font-size: 18px;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 1px;
}

.side-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(74, 123, 155, 0.06);
  border: 1px solid rgba(74, 123, 155, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 14px;
  transition: all var(--transition-smooth);
}

.side-drawer-close:hover {
  background: rgba(74, 123, 155, 0.12);
  border-color: var(--color-primary);
}

.drawer-tag-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-tag {
  display: block;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: 300;
  color: var(--color-text);
  transition: all var(--transition-smooth);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.drawer-tag:hover,
.drawer-tag.active {
  background: rgba(74, 123, 155, 0.1);
  border-color: rgba(74, 123, 155, 0.25);
  color: var(--color-primary);
}

/* === 页脚 === */
.site-footer {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(74, 123, 155, 0.08);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.footer-col {
  flex: 1;
  min-width: 200px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-col p,
.footer-col a {
  font-size: var(--font-sm);
  font-weight: 300;
  color: var(--color-text-light);
  line-height: 2;
  text-decoration: none;
  display: block;
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  max-width: 1320px;
  margin: 32px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid rgba(74, 123, 155, 0.06);
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text-light);
}

.footer-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--color-text-light);
  opacity: 0.85;
}

/* === 磨砂按钮通用 === */
.btn-matte {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 28px;
  font-size: var(--font-sm);
  font-weight: 300;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
  font-family: inherit;
  border: 1px solid rgba(74, 123, 155, 0.25);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.btn-matte:hover {
  background: rgba(74, 123, 155, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-matte-primary {
  background: rgba(74, 123, 155, 0.1);
  border-color: rgba(74, 123, 155, 0.3);
  color: var(--color-primary);
}

.btn-matte-primary:hover {
  background: rgba(74, 123, 155, 0.18);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* === 大图预览弹窗 === */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(51, 56, 64, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.image-preview-modal.open {
  opacity: 1;
  visibility: visible;
}

.image-preview-modal img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform var(--transition-bounce);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-preview-modal.open img {
  transform: scale(1);
}

.image-preview-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.image-preview-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* === 轻浮动标题装饰 === */
.section-title {
  font-size: var(--font-lg);
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 2px;
  text-align: center;
  position: relative;
  display: inline-block;
  animation: gentleFloat 6s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 48px;
}

.section-title-wrapper .ripple-decoration {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(74, 123, 155, 0.2);
  transform: translate(-50%, -50%);
  animation: rippleDeco 4s ease-in-out infinite;
}

@keyframes rippleDeco {
  0%, 100% { width: 80px; height: 80px; opacity: 0.4; }
  50% { width: 120px; height: 120px; opacity: 0; }
}

/* === 响应式工具 === */
@media (max-width: 768px) {
  :root {
    --font-xl: 28px;
    --font-lg: 20px;
    --font-md: 15px;
    --font-sm: 13px;
  }

  .nav-search input {
    width: 140px;
  }
  .nav-search input:focus {
    width: 180px;
  }

  .site-nav {
    padding: 12px 0;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }
}

/* ============================================================
   点击花瓣飘散效果
   ============================================================ */
.petal {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 150% 0 150% 0;
  opacity: 0;
  filter: blur(0.3px);
  box-shadow: 0 0 6px rgba(248, 200, 220, 0.25);
  will-change: transform, opacity;
}

@keyframes petalScatter {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(var(--start-rot)) scale(0.2);
  }
  8% {
    opacity: 0.85;
    transform: translate(calc(var(--dx) * 0.08), calc(var(--dy) * 0.08)) rotate(calc(var(--start-rot) + var(--rot) * 0.08)) scale(1);
  }
  35% {
    opacity: 0.7;
    transform: translate(calc(var(--dx) * 0.35), calc(var(--dy) * 0.35)) rotate(calc(var(--start-rot) + var(--rot) * 0.35)) scale(0.92);
  }
  65% {
    opacity: 0.4;
    transform: translate(calc(var(--dx) * 0.65), calc(var(--dy) * 0.65)) rotate(calc(var(--start-rot) + var(--rot) * 0.65)) scale(0.7);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(calc(var(--start-rot) + var(--rot))) scale(0.25);
  }
}