/* Background Page Enhanced Styles */

/* 全局背景和渐变效果 */
body.background-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  position: relative;
}

body.background-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  pointer-events: none;
  z-index: 1;
}

/* Header Enhancements */
#header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 100;
}

#header .inner {
  position: relative;
}

#logo {
  padding: 15px 0;
}

#logo svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

#logo:hover svg {
  transform: scale(1.05);
}

.nav li a {
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav li.cur > a::after,
.nav li:hover a::after {
  width: 80%;
}

/* Main Content Container */
.background-detail {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin: 40px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 10;
}

.background-detail .inner {
  padding: 60px 40px;
}

/* Section Title Enhancements */
.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title h2 {
  font-size: 2.5em;
  font-weight: 300;
  color: #2c3e50;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

.section-title h4 {
  font-size: 1.1em;
  color: #7f8c8d;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Content Sections */
.background-content {
  max-width: 800px;
  margin: 0 auto;
}

.mission-section,
.mystery-section,
.decision-section {
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.mission-section { animation-delay: 0.2s; }
.mystery-section { animation-delay: 0.4s; }
.decision-section { animation-delay: 0.6s; }

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

.mission-section h3,
.mystery-section h3,
.decision-section h3 {
  font-size: 1.8em;
  color: #2c3e50;
  margin-bottom: 25px;
  position: relative;
  padding-left: 20px;
}

.mission-section h3::before,
.mission-section h3::after,
.mystery-section h3::before,
.mystery-section h3::after,
.decision-section h3::before,
.decision-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  transform: translateY(-50%);
}

.mission-section h3::before,
.mystery-section h3::before,
.decision-section h3::before {
  left: 0;
}

.mission-section h3::after,
.mystery-section h3::after,
.decision-section h3::after {
  left: 15px;
}

.mission-section p,
.mystery-section p,
.decision-section p {
  font-size: 1.1em;
  line-height: 1.8;
  color: #34495e;
  margin-bottom: 20px;
  text-align: justify;
  position: relative;
  padding: 0 10px;
}

.mission-section p::before,
.mission-section p::after,
.mystery-section p::before,
.mystery-section p::after,
.decision-section p::before,
.decision-section p::after {
  content: '"';
  font-size: 2em;
  color: rgba(102, 126, 234, 0.2);
  position: absolute;
  font-family: Georgia, serif;
}

.mission-section p::before,
.mystery-section p::before,
.decision-section p::before {
  left: -10px;
  top: -10px;
}

.mission-section p::after,
.mystery-section p::after,
.decision-section p::after {
  right: -10px;
  bottom: -20px;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
  margin: 40px 0;
  position: relative;
}

.divider::before {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 0 15px;
  color: #667eea;
  font-size: 1.2em;
}

/* Timeline Section */
.timeline {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  margin: 40px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 10;
}

.timeline .inner {
  padding: 60px 40px;
}

.timeline-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 50px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.8s; }
.timeline-item:nth-child(2) { animation-delay: 1.0s; }
.timeline-item:nth-child(3) { animation-delay: 1.2s; }
.timeline-item:nth-child(4) { animation-delay: 1.4s; }

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
  z-index: 2;
}

.timeline-year {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1em;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  min-width: 150px;
  text-align: center;
}

.timeline-text {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px 30px;
  border-radius: 15px;
  font-size: 1.1em;
  color: #2c3e50;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  text-align: center;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Footer Enhancements */
#footer {
  background: rgba(49, 53, 61, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 80px;
  position: relative;
  z-index: 10;
}

#footer .inner {
  padding: 40px 0;
}

#links ul li {
  transition: all 0.3s ease;
}

#links ul li:hover {
  transform: translateY(-2px);
}

#links ul li a {
  transition: all 0.3s ease;
}

#links ul li:hover a {
  color: #667eea;
}

/* Responsive Design */
@media only screen and (max-width: 1024px) {
  .background-detail .inner,
  .timeline .inner {
    padding: 40px 20px;
  }
  
  .section-title h2 {
    font-size: 2em;
  }
  
  .timeline-content::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row !important;
    padding-left: 80px;
  }
  
  .timeline-year {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px;
    padding: 10px 20px;
    min-width: auto;
  }
  
  .timeline-text {
    text-align: left;
  }
}

@media only screen and (max-width: 768px) {
  .background-detail,
  .timeline {
    margin: 20px 10px;
    border-radius: 15px;
  }
  
  .section-title h2 {
    font-size: 1.5em;
  }
  
  .mission-section h3,
  .mystery-section h3,
  .decision-section h3 {
    font-size: 1.4em;
  }
  
  .mission-section p,
  .mystery-section p,
  .decision-section p {
    font-size: 1em;
  }
  
  .timeline-year {
    font-size: 0.9em;
    padding: 8px 15px;
  }
  
  .timeline-text {
    font-size: 0.95em;
    padding: 15px 20px;
  }
}

@media only screen and (max-width: 540px) {
  .section-title h2 {
    font-size: 1.3em;
  }
  
  .mission-section h3,
  .mystery-section h3,
  .decision-section h3 {
    font-size: 1.2em;
  }
  
  .timeline-year {
    font-size: 0.8em;
    padding: 6px 12px;
  }
  
  .timeline-text {
    font-size: 0.9em;
    padding: 12px 15px;
  }
}

/* Loading Animation */
.loading-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.loading-animation.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

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

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
