/* ========================================
   布局样式 - Layout Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--color-cream);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ========== Header & Navigation ========== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base) var(--ease-out);
}

.main-nav {
  padding: var(--spacing-sm) 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-xl);
  font-weight: bold;
  color: var(--color-secondary-pink);
  text-decoration: none;
}

.logo-icon {
  font-size: var(--font-size-2xl);
  animation: sparkle 2s ease-in-out infinite;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-base);
  font-weight: 500;
  position: relative;
  padding: var(--spacing-xs) 0;
  transition: color var(--transition-base) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width var(--transition-base) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent-pink);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-secondary-pink);
  border-radius: 2px;
  transition: all var(--transition-base) var(--ease-out);
}

/* ========== Hero Section ========== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--spacing-3xl) var(--spacing-md);
  background: var(--gradient-dream);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
}

.stars-container {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-accent);
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-lg);
  color: var(--color-accent-pink);
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.title-line {
  display: block;
  margin-bottom: var(--spacing-sm);
}

.title-highlight {
  font-size: var(--font-size-4xl);
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin-bottom: var(--spacing-xl);
  font-weight: 500;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-lg);
  font-weight: bold;
  color: var(--color-white);
  background: var(--gradient-main);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-button);
  transition: all var(--transition-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.cta-button:hover::before {
  transform: translateX(100%);
}

.button-sparkle {
  display: inline-block;
  animation: twinkle 1.5s ease-in-out infinite;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--color-text-light);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
  font-size: var(--font-size-2xl);
  margin-top: var(--spacing-xs);
}

/* ========== Section 通用样式 ========== */
section {
  padding: var(--spacing-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-title {
  font-family: var(--font-accent);
  font-size: var(--font-size-3xl);
  color: var(--color-accent-pink);
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
}

/* ========== Characters Section ========== */
.characters-section {
  background: linear-gradient(to bottom, var(--color-cream), var(--color-white));
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.character-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base) var(--ease-bounce);
  cursor: pointer;
}

.character-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-soft);
}

.character-image {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.character-placeholder {
  font-size: 6rem;
  opacity: 0.8;
}

.character-info {
  padding: var(--spacing-lg);
}

.character-name {
  font-family: var(--font-accent);
  font-size: var(--font-size-2xl);
  color: var(--color-accent-pink);
  margin-bottom: var(--spacing-xs);
}

.character-role {
  font-size: var(--font-size-sm);
  color: var(--color-secondary-pink);
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.character-description {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.8;
}

/* ========== Story Section ========== */
.story-section {
  background: var(--color-white);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-xl) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-main);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-2xl);
  padding: 0 var(--spacing-xl);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
  text-align: right;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: var(--gradient-main);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: var(--font-size-xl);
  font-weight: bold;
  box-shadow: var(--shadow-glow);
  z-index: var(--z-base);
}

.timeline-content {
  width: calc(50% - var(--spacing-2xl));
  background: var(--gradient-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
}

.timeline-title {
  font-family: var(--font-accent);
  font-size: var(--font-size-xl);
  color: var(--color-accent-pink);
  margin-bottom: var(--spacing-xs);
}

.timeline-date {
  font-size: var(--font-size-sm);
  color: var(--color-secondary-pink);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.timeline-description {
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.8;
}

/* ========== Gallery Section ========== */
.gallery-section {
  background: linear-gradient(to bottom, var(--color-white), var(--color-lavender));
}

.gallery-filter {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.filter-button {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-white);
  border: 2px solid var(--color-primary-pink);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
}

.filter-button:hover,
.filter-button.active {
  background: var(--gradient-main);
  color: var(--color-white);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  aspect-ratio: 1;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-soft);
}

.gallery-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-placeholder {
  font-size: 4rem;
  opacity: 0.8;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 105, 180, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base) var(--ease-out);
}

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

.gallery-title {
  color: var(--color-white);
  font-size: var(--font-size-lg);
  font-weight: 600;
  text-align: center;
  padding: var(--spacing-md);
}

.gallery-item.hidden {
  display: none;
}

/* ========== Lightbox ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.lightbox.active {
  display: flex;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--color-white);
  font-size: var(--font-size-3xl);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 105, 180, 0.8);
  transform: scale(1.1);
}

.lightbox-close {
  top: var(--spacing-lg);
  right: var(--spacing-lg);
}

.lightbox-prev {
  left: var(--spacing-lg);
}

.lightbox-next {
  right: var(--spacing-lg);
}

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  text-align: center;
}

.lightbox-image-wrapper {
  background: var(--gradient-soft);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  min-width: 300px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.lightbox-caption {
  margin-top: var(--spacing-md);
  color: var(--color-white);
  font-size: var(--font-size-xl);
}

/* ========== Interactive Section ========== */
.interactive-section {
  background: var(--color-white);
}

.interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.interactive-title {
  font-family: var(--font-accent);
  font-size: var(--font-size-2xl);
  color: var(--color-accent-pink);
  text-align: center;
  margin-bottom: var(--spacing-sm);
}

.interactive-description {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

/* 许愿树 */
.wishing-tree-container {
  background: var(--gradient-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.wishing-tree {
  position: relative;
  height: 350px;
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(to bottom, #87CEEB, #98FB98);
}

.tree-trunk {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 100px;
  background: #8B4513;
  border-radius: var(--radius-sm);
}

.tree-crown {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: #228B22;
  border-radius: var(--radius-full);
  box-shadow:
    0 0 0 30px rgba(34, 139, 34, 0.5),
    0 0 0 60px rgba(34, 139, 34, 0.3);
}

.wish-input-container {
  display: flex;
  gap: var(--spacing-sm);
}

.wish-input {
  flex: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  border: 2px solid var(--color-primary-pink);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-base) var(--ease-out);
}

.wish-input:focus {
  border-color: var(--color-accent-pink);
}

.wish-button {
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-white);
  background: var(--gradient-main);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  white-space: nowrap;
}

.wish-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-button);
}

/* 魔法阵 */
.magic-circle-container {
  background: var(--gradient-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.magic-circle-wrapper {
  position: relative;
  width: 300px;
  height: 300px;
  margin: var(--spacing-lg) 0;
}

.magic-circle {
  position: absolute;
  border: 3px solid;
  border-radius: var(--radius-full);
  opacity: 0.6;
}

.circle-1 {
  inset: 0;
  border-color: var(--color-secondary-pink);
  border-style: dashed;
}

.circle-2 {
  inset: 30px;
  border-color: var(--color-lavender);
  border-style: dotted;
}

.circle-3 {
  inset: 60px;
  border-color: var(--color-gold);
  border-style: solid;
}

.magic-symbol {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-accent-pink);
  text-shadow: 0 0 20px var(--color-secondary-pink);
}

/* ========== Footer ========== */
.main-footer {
  background: var(--gradient-main);
  color: var(--color-white);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

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

.footer-section h4 {
  font-family: var(--font-accent);
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}

.footer-text {
  line-height: 1.8;
  opacity: 0.9;
}

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

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: var(--color-white);
  text-decoration: none;
  transition: opacity var(--transition-base) var(--ease-out);
}

.footer-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  text-decoration: none;
  transition: all var(--transition-base) var(--ease-out);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.9;
}
