/*
==============================================
《幸福岛幻想》(Fantasy of Bliss Island) 官方网站样式
符合2024-2025年Web标准和SEO最佳实践
主题：日漫风格，白色主色调配日式配色
==============================================
*/

/* CSS变量定义 - 日式主题色彩 */
:root {
  /* 主色调 - 日式配色方案 */
  --primary-white: #ffffff;
  --sakura-pink: #ffb7c5;
  --ocean-blue: #6bb6ff;
  --sunset-orange: #ff9966;
  --forest-green: #7cc142;
  --sky-purple: #a855f7;
  --golden-yellow: #ffd700;
  
  /* 文本颜色 */
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-light: #718096;
  
  /* 阴影和边框 */
  --shadow-soft: 0 4px 20px rgba(107, 182, 255, 0.15);
  --shadow-medium: 0 8px 30px rgba(107, 182, 255, 0.2);
  --border-radius: 12px;
  
  /* 渐变 */
  --gradient-hero: linear-gradient(135deg, #ffb7c5 0%, #6bb6ff 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
}

/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--primary-white);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 性能优化 - 字体显示 */
@font-face {
  font-family: 'Noto Sans SC';
  font-display: swap; /* 提升CLS指标 */
}

/* ========================
   响应式容器系统
======================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-fluid {
  width: 100%;
  padding: 0 15px;
}

/* ========================
   头部导航区域
======================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ocean-blue);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--ocean-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-bar {
  width: 25px;
  height: 3px;
  background: var(--ocean-blue);
  transition: all 0.3s ease;
}

/* ========================
   英雄区域/主横幅
======================== */
.hero {
  background: var(--gradient-hero);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/1.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 15px;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 40px;
  opacity: 0.8;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* ========================
   按钮样式系统
======================== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-hero);
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(107, 182, 255, 0.3);
}

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

.btn:hover::before {
  left: 100%;
}

/* ========================
   内容区域布局
======================== */
.section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--gradient-hero);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ocean-blue); /* fallback */
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 60px;
}

/* ========================
   卡片组件系统
======================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card {
  background: var(--gradient-card);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(107, 182, 255, 0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.card-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  border-radius: 12px;
  object-fit: cover;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================
   角色展示区域
======================== */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.character-card {
  text-align: center;
  background: var(--primary-white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.character-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.character-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 15px;
  object-fit: cover;
  border: 3px solid var(--sakura-pink);
}

.character-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ========================
   图片画廊
======================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(107, 182, 255, 0.8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ========================
   FAQ手风琴组件
======================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid rgba(107, 182, 255, 0.2);
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  overflow: hidden;
}

.faq-question {
  background: var(--gradient-card);
  padding: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(107, 182, 255, 0.05);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--primary-white);
}

.faq-answer.active {
  padding: 20px;
  max-height: 200px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
  transform: rotate(180deg);
}

/* ========================
   页脚区域
======================== */
.footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: white;
  padding: 60px 0 30px;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--sakura-pink);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--sakura-pink);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--sakura-pink);
  transform: translateY(-2px);
}

/* ========================
   动画效果
======================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* 滚动显示动画 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   移动端优化
======================== */
@media (max-width: 768px) {
  /* 导航菜单移动端优化 */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    transition: left 0.3s ease;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* 英雄区域移动端优化 */
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  /* 卡片网格移动端优化 */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  /* 容器移动端优化 */
  .container {
    padding: 0 15px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .characters-grid {
    grid-template-columns: 1fr;
  }
  
  .character-avatar {
    width: 80px;
    height: 80px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ========================
   性能优化和无障碍
======================== */

/* 减少动画对性能敏感用户的影响 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --ocean-blue: #0066cc;
  }
}

/* 暗色主题支持（可选） */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-white: #1a202c;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e0;
  }
  
  .header {
    background: rgba(26, 32, 44, 0.95);
  }
  
  .card {
    background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
  }
}

/* ========================
   打印样式优化
======================== */
@media print {
  .header,
  .footer,
  .hero-buttons,
  .btn {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: 20px 0;
  }
  
  body {
    color: #000;
    background: #fff;
  }
}

/* 懒加载图片优化 */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* 
==============================================
样式文件结束
此CSS文件已完全优化，支持：
- 2024年Web标准
- 移动优先响应式设计
- 无障碍友好
- 性能优化（CLS/LCP/FID改善）
- SEO友好的结构化样式
- 日漫风格视觉设计
==============================================
*/