/* ============================
   全局样式
   ============================ */
:root {
  --primary-color: #4f46e5;
  --secondary-color: #7c3aed;
  --accent-color: #f59e0b;
  --bg-light: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --border-radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ============================
   首页样式
   ============================ */
.home-container {
  text-align: center;
  padding: 40px 20px;
}

.home-container h1 {
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.home-container > p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 50px;
}

/* ============================
   功能卡片
   ============================ */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 60px;
}

.feature-card {
  background: white;
  padding: 32px 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.feature-card p {
  color: var(--text-light);
  margin-bottom: 20px;
}

.card-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.card-link:hover {
  color: var(--secondary-color);
}

/* ============================
   关于区域
   ============================ */
.about-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: var(--border-radius);
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.about-section p {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* ============================
   故事页面
   ============================ */
.stories-container {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.stories-container h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.story-box {
  background: white;
  padding: 30px;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.story-box:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
}

.story-box h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.story-box p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.story-tags {
  display: flex;
  gap: 8px;
}

.tag {
  background: #e0e7ff;
  color: var(--primary-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================
   港口页面
   ============================ */
.harbor-container {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.harbor-container h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.harbor-container > p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.resource-card {
  background: white;
  padding: 28px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.resource-card:hover {
  border-color: var(--accent-color);
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.resource-card h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.resource-card ul {
  list-style: none;
  padding: 0;
}

.resource-card li {
  padding: 8px 0;
  color: var(--text-light);
  border-bottom: 1px solid #f1f5f9;
}

.resource-card li:last-child {
  border-bottom: none;
}

/* ============================
   关于本站
   ============================ */
.about-container {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.about-container h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--text-dark);
}

.about-box {
  background: white;
  padding: 30px;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.about-box:hover {
  box-shadow: var(--shadow-hover);
}

.about-box h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-box p,
.about-box li {
  color: var(--text-light);
  line-height: 1.7;
}

.about-box ul {
  padding-left: 20px;
}

.about-box li {
  margin-bottom: 8px;
}

.about-box a {
  color: var(--primary-color);
  text-decoration: none;
}

.about-box a:hover {
  text-decoration: underline;
}

/* ============================
   论坛页面
   ============================ */
.forum-container {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.forum-container h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.forum-container > p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.forum-section {
  margin-bottom: 40px;
}

.forum-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.forum-card {
  background: white;
  padding: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.forum-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.forum-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.forum-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.forum-card p {
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.6;
}

.forum-card .date {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ============================
   动画效果
   ============================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-delay-1 {
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

.fade-in-delay-4 {
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-5 {
  animation: fadeInUp 0.6s ease-out 0.5s forwards;
  opacity: 0;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.bounce {
  animation: bounce 2s ease-in-out infinite;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================
   滚动动画类 - JS控制
   ============================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

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

/* ============================
   响应式设计
   ============================ */
@media (max-width: 768px) {
  .home-container h1 {
    font-size: 2rem;
  }
  
  .feature-cards {
    grid-template-columns: 1fr;
  }
  
  .about-section {
    padding: 24px;
  }
  
  .stories-container h1,
  .harbor-container h1,
  .about-container h1,
  .forum-container h1 {
    font-size: 2rem;
  }
}

/* ============================
   深色模式支持
   ============================ */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #e2e8f0;
    --text-light: #94a3b8;
    --bg-light: #1e293b;
  }
  
  .feature-card,
  .story-box,
  .resource-card,
  .about-box,
  .forum-card {
    background: #1e293b;
    border-color: #334155;
  }
  
  .tag {
    background: #312e81;
  }
  
  .about-section {
    background: linear-gradient(135deg, #1e3a5f, #0c4a6e);
  }
}
