/*
* 文件名称: index.css
* 功能说明: AI炒股学习网首页专用样式表 - 定义首页特有的布局和视觉效果
* 创建日期: 2025年1月
* 作者: AI炒股学习网开发团队
* 说明: 首页横幅、功能介绍、内容推荐等区域的样式定义
*/

/* 首页横幅区域样式 */
.hero {
  background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%); /* 淡红色渐变背景 */
  padding: 60px 0;
  margin: 0; /* 移除底部边距，避免与下一个版块重叠 */
  position: relative; /* 确保正常文档流 */
  z-index: 1; /* 设置层级 */
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 两列等宽布局 */
  gap: 50px;
  align-items: center;
}

.hero-content h2 {
  font-size: 2.5em;
  color: #d32f2f;
  margin-bottom: 20px;
  border: none; /* 移除下划线 */
}

.hero-content p {
  font-size: 1.2em;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* 允许按钮换行 */
}

/* 图表占位符样式 */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-placeholder {
  width: 300px;
  height: 200px;
  background-color: #ffffff;
  border: 2px solid #d32f2f;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(211, 47, 47, 0.2); /* 红色阴影 */
}

.chart-line {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, #d32f2f 0%, #e57373 50%, #d32f2f 100%);
  transform: translateY(-50%);
  animation: pulse 2s ease-in-out infinite; /* 脉冲动画 */
}

.chart-bars {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  height: 60px;
  background: repeating-linear-gradient(
    90deg,
    #d32f2f 0px,
    #d32f2f 8px,
    transparent 8px,
    transparent 20px
  ); /* 条形图效果 */
  opacity: 0.6;
}

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

/* 功能特色区域样式 */
.features {
  padding: 80px 0; /* 统一内边距 */
  margin: 0; /* 确保没有额外边距 */
  background-color: #fafafa; /* 浅灰背景 */
  position: relative; /* 确保正常文档流 */
  z-index: 1; /* 设置层级 */
}

.features h2 {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.2em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 响应式网格 */
  gap: 30px;
}

.feature-item {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* 悬停效果 */
}

.feature-item:hover {
  transform: translateY(-5px); /* 悬停时上移 */
  box-shadow: 0 5px 20px rgba(211, 47, 47, 0.2);
}

.feature-icon {
  font-size: 3em;
  margin-bottom: 20px;
  display: block;
}

.feature-item h3 {
  color: #d32f2f;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.feature-item p {
  color: #666;
  line-height: 1.6;
  text-align: left; /* 左对齐文本 */
}

/* 热门内容推荐区域 */
.popular-content {
  padding: 80px 0; /* 统一内边距 */
  margin: 0; /* 确保没有额外边距 */
  background-color: #ffffff;
  position: relative; /* 确保正常文档流 */
  z-index: 1; /* 设置层级 */
}

.popular-content h2 {
  text-align: center;
  margin-bottom: 40px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.content-item {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid #d32f2f; /* 左侧红色边框 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.content-item:hover {
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.2);
}

.content-item h3 {
  margin-bottom: 15px;
  font-size: 1.2em;
}

.content-item h3 a {
  color: #333;
  text-decoration: none;
}

.content-item h3 a:hover {
  color: #d32f2f;
}

.content-item p {
  color: #666;
  margin-bottom: 15px;
  font-size: 0.95em;
}

.read-more {
  color: #d32f2f;
  font-weight: 500;
  font-size: 0.9em;
}

/* 最新动态区域 */
.news {
  padding: 80px 0; /* 统一内边距 */
  margin: 0; /* 确保没有额外边距 */
  background-color: #fafafa;
  position: relative; /* 确保正常文档流 */
  z-index: 1; /* 设置层级 */
}

.news h2 {
  text-align: center;
  margin-bottom: 40px;
}

.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: #ffffff;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.news-item:hover {
  transform: translateX(5px); /* 悬停时右移 */
}

.news-date {
  background-color: #d32f2f;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  margin-right: 20px;
  white-space: nowrap; /* 日期不换行 */
}

.news-item h4 {
  margin: 0;
  flex: 1; /* 占据剩余空间 */
}

.news-item h4 a {
  color: #333;
  font-size: 1em;
  font-weight: 500;
}

.news-item h4 a:hover {
  color: #d32f2f;
}

/* 响应式设计 - 平板设备 */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr; /* 单列布局 */
    gap: 30px;
    text-align: center;
  }
  
  .hero-content h2 {
    font-size: 2em;
  }
  
  .hero-content p {
    font-size: 1.1em;
  }
  
  .chart-placeholder {
    width: 250px;
    height: 150px;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* 免责声明样式 */
.disclaimer-section {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #f8f9fa;
    padding: 60px 0;
    margin-top: -1px;
    border-top: none;
    border-bottom: 1px solid #343a40;
    position: relative;
}

.disclaimer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60"><circle cx="30" cy="30" r="1" fill="rgba(248,249,250,0.1)"/></svg>') repeat;
    background-size: 60px 60px;
    animation: float 25s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-60px); }
}

.disclaimer-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.disclaimer-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.disclaimer-content h3 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.disclaimer-content h3::before {
    content: '⚠️';
    font-size: 32px;
    animation: pulse 3s infinite;
}

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

.disclaimer-subtitle {
    font-size: 16px;
    color: #ced4da;
    margin: 0;
    font-weight: 400;
}

.disclaimer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.disclaimer-main {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.disclaimer-main p {
    margin-bottom: 16px;
    line-height: 1.7;
    font-size: 16px;
    color: #495057;
}

.disclaimer-main p:first-child {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.disclaimer-main p:not(:first-child) {
    padding-left: 20px;
    position: relative;
}

.disclaimer-main p:not(:first-child)::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #007bff;
    font-weight: bold;
    font-size: 16px;
}

.disclaimer-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.risk-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 25px;
    color: #856404;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    position: relative;
}

.risk-notice::before {
    content: '💡';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 22px;
    animation: bounce 3s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.risk-notice h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #856404;
}

.risk-notice p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

.contact-info {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-info h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
    text-align: center;
}

.contact-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #6c757d;
    text-align: center;
}

.contact-info .highlight {
    color: #007bff;
    font-weight: 500;
}

/* 响应式设计 - 手机设备 */
@media (max-width: 480px) {
  .hero {
    padding: 40px 0;
  }
  
  .hero-content h2 {
    font-size: 1.8em;
  }
  
  .hero-buttons {
    flex-direction: column; /* 垂直排列按钮 */
    align-items: center;
  }
  
  .chart-placeholder {
    width: 200px;
    height: 120px;
  }
  
  .features,
  .popular-content,
  .news {
    padding: 30px 0;
  }
  
  .feature-item {
    padding: 20px;
  }
  
  .news-item {
    flex-direction: column; /* 垂直排列 */
    align-items: flex-start;
    gap: 10px;
  }
  
  .news-date {
    margin-right: 0;
  }
  
  .disclaimer-section {
      padding: 40px 0;
    }
    
    .disclaimer-content {
      padding: 0 15px;
    }
    
    .disclaimer-header {
      margin-bottom: 30px;
      padding-bottom: 15px;
    }
    
    .disclaimer-content h3 {
      font-size: 24px;
      flex-direction: column;
      gap: 8px;
    }
    
    .disclaimer-content h3::before {
      font-size: 28px;
    }
    
    .disclaimer-subtitle {
      font-size: 14px;
    }
    
    .disclaimer-grid {
      grid-template-columns: 1fr;
      gap: 25px;
    }
    
    .disclaimer-main {
      padding: 25px 20px;
    }
    
    .disclaimer-main p {
      font-size: 15px;
    }
    
    .disclaimer-main p:first-child {
      font-size: 17px;
    }
    
    .disclaimer-main p:not(:first-child) {
      padding-left: 18px;
    }
    
    .disclaimer-sidebar {
      gap: 15px;
    }
    
    .risk-notice {
      padding: 20px;
    }
    
    .risk-notice::before {
      font-size: 20px;
      top: 12px;
      right: 15px;
    }
    
    .risk-notice h4 {
      font-size: 15px;
    }
    
    .risk-notice p {
      font-size: 13px;
    }
    
    .contact-info {
      padding: 20px;
    }
    
    .contact-info h4 {
      font-size: 15px;
    }
    
    .contact-info p {
      font-size: 13px;
    }
}