/*
 * 银龄守护公告页面 - 现代设计
 * 配色方案 A：温暖青绿
 */

/* ==================== CSS 变量 ==================== */
:root {
  /* 温暖青绿配色 */
  --color-primary: #00A896;
  --color-primary-light: #02C39A;
  --color-primary-dark: #008080;

  /* 辅助色 */
  --color-accent: #FF6B6B;
  --color-accent-hover: #FF5252;

  /* 中性色 */
  --color-bg: #F0F7F4;
  --color-surface: #FFFFFF;
  --color-text: #1A202C;
  --color-text-secondary: #4A5568;
  --color-text-muted: #718096;
  --color-border: #E2E8F0;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 168, 150, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 168, 150, 0.12);
  --shadow-lg: 0 20px 40px rgba(0, 168, 150, 0.15);
  --shadow-xl: 0 32px 64px rgba(0, 168, 150, 0.2);

  /* 间距 */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 64px;
  --spacing-3xl: 120px;

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* 动画 */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 全局样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: blob-float 20s ease-in-out infinite;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(225deg, var(--color-primary-light) 0%, #4ECDC4 100%);
  bottom: -100px;
  left: -100px;
  animation-delay: 7s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(45deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

@keyframes blob-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(-30px, -20px) scale(1.05);
  }
}

/* ==================== Hero Section ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
}

.hero-title {
  font-size: clamp(48px, 12vw, 96px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-lg);
  color: var(--color-primary);
}

.hero-title .word {
  display: inline-block;
  opacity: 0;
  animation: word-reveal 0.8s ease forwards;
}

.hero-title .word:nth-child(1) { animation-delay: 0.2s; }
.hero-title .word:nth-child(2) { animation-delay: 0.4s; }
.hero-title .word:nth-child(3) { animation-delay: 0.6s; }
.hero-title .word:nth-child(4) { animation-delay: 0.8s; }
.hero-title .word:nth-child(5) {
  animation:
    word-reveal 0.8s ease 1.0s forwards,
    version-fade 0.1s ease 1.8s forwards;
}

@keyframes version-fade {
  to {
    opacity: 0.8;
  }
}

.hero-title .word.version {
  font-size: 0.4em;
  font-weight: 600;
  margin-left: 0.2em;
}

@keyframes word-reveal {
  from {
    opacity: 0;
    transform: translateY(40px) rotateX(-20deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.hero-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
  font-weight: 400;
  opacity: 0;
  animation: fade-in-up 1s ease 0.6s forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 版本号徽章 */
.version-badge {
  display: inline-block;
  font-size: 0.4em;
  font-weight: 600;
  color: var(--color-primary-light);
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* 额外延迟的淡入动画 - 在标题动画结束后出现 */
.fade-in-extra-delayed {
  opacity: 0;
  animation: fade-in-up 1s ease 1.6s forwards;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.cta-button.primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  box-shadow: var(--shadow-md);
  opacity: 0;
  animation: fade-in-up 1s ease 0.8s forwards;
}

.cta-button.secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  opacity: 0;
  animation: fade-in-up 1s ease 1.0s forwards;
}

.cta-button.secondary:hover {
  border-color: var(--color-primary-dark);
  background: rgba(0, 168, 150, 0.1);
}

.cta-button.primary:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.cta-button.primary::before,
.cta-button.secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.cta-button.primary:hover::before,
.cta-button.secondary:hover::before {
  left: 100%;
}

.cta-button svg {
  transition: transform var(--transition-base);
}

.cta-button:hover svg {
  transform: translateX(4px);
}

/* 按钮组容器 */
.hero-buttons {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== Features Header ==================== */
.features-header {
  padding: 80px var(--spacing-md) 60px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.features-header-content {
  max-width: 800px;
  margin: 0 auto;
}

.features-title {
  display: none;
}

.features-subtitle {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.6;
}

/* ==================== Feature Section ==================== */
.feature-section {
  padding: 100px var(--spacing-md);
  position: relative;
  z-index: 1;
}

.feature-section:first-of-type {
  padding-top: 80px;
}

.feature-section:nth-child(even) {
  background-color: var(--color-bg-alt);
}

.feature-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.feature-left .feature-image {
  order: 1;
}

.feature-left .feature-text {
  order: 2;
}

.feature-right .feature-image {
  order: 2;
}

.feature-right .feature-text {
  order: 1;
}

.feature-number {
  font-size: 72px;
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.15;
  display: block;
  margin-bottom: -40px;
  line-height: 1;
}

.feature-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.feature-divider {
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.feature-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: var(--color-text-secondary);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* ==================== Carousel ==================== */
/* iPhone 设备外壳 */
.carousel {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1284 / 2778;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 45px;
  padding: 6px;
  box-shadow:
    0 0 0 2px #3a3a3a,
    0 30px 60px rgba(0, 168, 150, 0.3);
}

/* 屏幕区域 */
.carousel::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: #000;
  border-radius: 39px;
  z-index: 0;
}

/* 左侧按钮组：音量键 + 静音键 */
.carousel::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 120px;
  width: 3px;
  height: 60px;
  background: #3a3a3a;
  border-radius: 2px 0 0 2px;
  box-shadow:
    0 70px 0 0 #3a3a3a,
    0 140px 0 0 #3a3a3a;
  z-index: 1;
}

/* 右侧按钮：电源键 */
.carousel-buttons-right {
  position: absolute;
  right: -3px;
  top: 140px;
  width: 3px;
  height: 50px;
  background: #3a3a3a;
  border-radius: 0 2px 2px 0;
  z-index: 1;
}

/* 屏幕内容容器：限制动画在屏幕区域内 */
.carousel-screen {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 39px;
  overflow: hidden;
  z-index: 2;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateX(100%);
}

.carousel-item.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.carousel-item.prev {
  transform: translateX(-100%);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 39px;
  overflow: hidden;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* ==================== Video Section ==================== */
.video-section {
  padding: 50px var(--spacing-md) var(--spacing-3xl);
  position: relative;
  z-index: 1;
}

.video-container {
  max-width: 500px;
  margin: 0 auto;
}

/* iPhone 设备外壳 */
.video-wrapper {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1284 / 2778;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 45px;
  padding: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #3a3a3a,
    0 30px 60px rgba(0, 168, 150, 0.3);
}

/* 屏幕区域 */
.video-wrapper::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: #000;
  border-radius: 39px;
  z-index: 0;
}

/* 左侧按钮组：音量键 + 静音键 */
.video-wrapper::after {
  content: '';
  position: absolute;
  left: -3px;
  top: 120px;
  width: 3px;
  height: 60px;
  background: #3a3a3a;
  border-radius: 2px 0 0 2px;
  box-shadow:
    0 70px 0 0 #3a3a3a,
    0 140px 0 0 #3a3a3a;
  z-index: 1;
}

/* 右侧按钮：电源键 */
.video-buttons-right {
  position: absolute;
  right: -3px;
  top: 140px;
  width: 3px;
  height: 50px;
  background: #3a3a3a;
  border-radius: 0 2px 2px 0;
  z-index: 1;
}

/* 屏幕内容容器：限制视频在屏幕区域内 */
.video-screen {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 39px;
  overflow: hidden;
  z-index: 2;
}

.demo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.3);
  transition: opacity var(--transition-base);
  z-index: 3;
}

.video-controls-left {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: auto;
  width: 48px;
  height: 48px;
  justify-self: center;
}

.video-controls-right {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: auto;
  width: 48px;
  height: 48px;
  justify-self: center;
}

.video-overlay:hover .video-controls-left,
.video-overlay:hover .video-controls-right {
  opacity: 1;
}

.video-controls-left svg,
.video-controls-right svg {
  width: 32px;
  height: 32px;
}

.play-button {
  margin: 0 auto;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* 进度条 */
.video-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 4;
  cursor: pointer;
  transition: height 0.2s ease;
}

.video-progress-bar:hover {
  height: 8px;
}

.video-progress-filled {
  position: relative;
  height: 100%;
  background: var(--color-primary);
  width: 0%;
  transition: width 0.1s linear;
}

/* 进度条手柄 */
.video-progress-handle {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.video-progress-bar:hover .video-progress-handle {
  opacity: 1;
  transform: translateY(-50%) scale(1.3);
}

.video-progress-bar:hover .video-progress-handle {
  right: -7px;
}

/* 倍速徽章 */
.video-speed-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  z-index: 4;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.video-speed-badge.visible {
  opacity: 1;
}

.video-info {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.video-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

.video-info p {
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* ==================== Contact Section ==================== */
.contact {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: var(--spacing-3xl) var(--spacing-md);
  position: relative;
  z-index: 1;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.contact-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: var(--spacing-xl);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  color: white;
  text-decoration: none;
  font-size: 16px;
  backdrop-filter: blur(10px);
  transition: all var(--transition-base);
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-lg);
}

.slogan {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.copyright {
  font-size: 14px;
  opacity: 0.7;
}

/* 版权信息 */
.footer-copyright {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

.footer-copyright p {
  margin: 4px 0;
}

/* ==================== 动画类 ==================== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  animation: fade-in 1s ease forwards;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

.fade-in-delayed {
  opacity: 0;
  animation: fade-in 1s ease 0.4s forwards;
}

/* ==================== 响应式设计 ==================== */

/* 手机端 */
@media (max-width: 767px) {
  :root {
    --spacing-3xl: 80px;
  }

  .feature-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature-left .feature-image,
  .feature-right .feature-image,
  .feature-left .feature-text,
  .feature-right .feature-text {
    order: unset;
  }

  .feature-number {
    font-size: 48px;
    margin-bottom: -24px;
  }

  .video-container {
    max-width: 100%;
  }

  .contact-links {
    flex-direction: column;
  }

  .blob {
    display: none;
  }
}

/* ==================== 无障碍设计 ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== 打印样式 ==================== */
@media print {
  .bg-decoration,
  .video-overlay {
    display: none;
  }

  body {
    background: white;
  }
}
