/* FAQ页面专用样式 */
/* 文件功能：常见问题页面的样式定义 */
/* 创建日期：2025-01-01 */
/* 作者：AI炒股学习网开发团队 */

/* 页面头部样式 */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
  opacity: 0.3;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  font-size: 14px;
  margin-bottom: 20px;
  opacity: 0.9;
}

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

.breadcrumb a:hover {
  color: white;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-description {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 搜索区域样式 */
.search-section {
  padding: 40px 0;
  background: #f8f9fa;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  overflow: hidden;
  background: white;
}

.search-input {
  flex: 1;
  padding: 15px 25px;
  border: none;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.search-input::placeholder {
  color: #999;
}

.search-btn {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 分类导航样式 */
.category-nav {
  padding: 30px 0;
  background: white;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 80px;
  z-index: 100;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 12px 24px;
  border: 2px solid #e0e0e0;
  background: white;
  color: #666;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.category-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

.category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* FAQ内容区域样式 */
.faq-content {
  padding: 60px 0;
  background: #f8f9fa;
}

.faq-category {
  margin-bottom: 50px;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

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

/* FAQ项目样式 */
.faq-item {
  background: white;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.faq-question {
  padding: 25px 30px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.faq-question:hover {
  background: #f8f9fa;
}

.faq-question h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  flex: 1;
  padding-right: 20px;
}

.toggle-icon {
  font-size: 1.5rem;
  font-weight: bold;
  color: #667eea;
  transition: transform 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.1);
}

.faq-item.active .toggle-icon {
  transform: rotate(45deg);
  background: #667eea;
  color: white;
}

.faq-answer {
  padding: 0 30px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #fafbfc;
}

.faq-item.active .faq-answer {
  padding: 30px;
  max-height: 2000px;
}

.faq-answer p {
  margin: 0 0 15px;
  line-height: 1.7;
  color: #555;
}

.faq-answer ul {
  margin: 15px 0;
  padding-left: 20px;
}

.faq-answer li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #666;
}

.faq-answer strong {
  color: #333;
  font-weight: 600;
}

/* 对比表格样式 */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comparison-table th,
.comparison-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.comparison-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
}

.comparison-table tr:hover {
  background: #f8f9fa;
}

/* 算法网格样式 */
.algorithm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.algorithm-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.algorithm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.algorithm-card h4 {
  margin: 0 0 15px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #667eea;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.algorithm-card ul {
  margin: 0;
  padding-left: 20px;
}

.algorithm-card li {
  margin-bottom: 8px;
  color: #666;
}

/* 指标列表样式 */
.metrics-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.metric-item {
  background: white;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.metric-item strong {
  display: block;
  margin-bottom: 10px;
  color: #333;
  font-size: 1.1rem;
}

/* 成功因素样式 */
.success-factors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 20px 0;
}

.factor-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #667eea;
}

.factor-card h4 {
  margin: 0 0 15px;
  color: #333;
  font-size: 1.2rem;
}

/* 步骤容器样式 */
.steps-container {
  margin: 20px 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.step-item:hover {
  transform: translateX(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 20px;
  flex-shrink: 0;
}

.step-content h4 {
  margin: 0 0 8px;
  color: #333;
  font-size: 1.1rem;
}

.step-content p {
  margin: 0;
  color: #666;
  line-height: 1.6;
}

/* 风险网格样式 */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.risk-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #e74c3c;
  transition: all 0.3s ease;
}

.risk-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.risk-card h4 {
  margin: 0 0 15px;
  color: #e74c3c;
  font-size: 1.1rem;
}

/* 控制措施样式 */
.control-measures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.measure-category {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #27ae60;
}

.measure-category h4 {
  margin: 0 0 15px;
  color: #27ae60;
  font-size: 1.1rem;
}

/* 软件网格样式 */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.software-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #3498db;
  transition: all 0.3s ease;
}

.software-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.software-card h4 {
  margin: 0 0 15px;
  color: #3498db;
  font-size: 1.1rem;
}

/* 选择标准样式 */
.selection-criteria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.criteria-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #f39c12;
}

.criteria-item h4 {
  margin: 0 0 15px;
  color: #f39c12;
  font-size: 1.1rem;
}

/* 联系我们区域样式 */
.contact-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.contact-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.contact-section > p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.2);
}

.contact-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.contact-item h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.contact-item p {
  margin: 0;
  opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-header {
    padding: 60px 0 40px;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-description {
    font-size: 1rem;
  }
  
  .search-box {
    flex-direction: column;
    border-radius: 12px;
  }
  
  .search-input,
  .search-btn {
    border-radius: 0;
  }
  
  .search-input {
    border-radius: 12px 12px 0 0;
  }
  
  .search-btn {
    border-radius: 0 0 12px 12px;
  }
  
  .category-tabs {
    gap: 5px;
  }
  
  .category-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .faq-question {
    padding: 20px;
  }
  
  .faq-question h3 {
    font-size: 1.1rem;
  }
  
  .faq-item.active .faq-answer {
    padding: 20px;
  }
  
  .algorithm-grid,
  .metrics-list,
  .success-factors,
  .risk-grid,
  .control-measures,
  .software-grid,
  .selection-criteria {
    grid-template-columns: 1fr;
  }
  
  .comparison-table {
    font-size: 14px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 10px;
  }
  
  .step-item {
    flex-direction: column;
    text-align: center;
  }
  
  .step-number {
    margin: 0 0 15px;
  }
  
  .contact-section h2 {
    font-size: 2rem;
  }
  
  .contact-methods {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.8rem;
  }
  
  .category-nav {
    padding: 20px 0;
  }
  
  .faq-content {
    padding: 40px 0;
  }
  
  .category-title {
    font-size: 1.5rem;
  }
  
  .faq-question {
    padding: 15px;
  }
  
  .faq-item.active .faq-answer {
    padding: 15px;
  }
  
  .contact-section {
    padding: 40px 0;
  }
}

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

.faq-item {
  animation: fadeInUp 0.6s ease forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

/* 加载状态 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #667eea;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 隐藏状态 */
.hidden {
  display: none;
}

/* 高亮搜索结果 */
.highlight {
  background: yellow;
  padding: 2px 4px;
  border-radius: 3px;
}