/*
* 文件名: comparison.css
* 功能: 软件对比页面样式
* 作者: AI助手
* 创建日期: 2024年12月
* 描述: 定义软件对比页面的布局、样式和交互效果
*/

/* 页面头部样式 */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 0 60px;
  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="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
  opacity: 0.3;
}

.header-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

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

.page-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.header-features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-icon {
  font-size: 1.5rem;
}

.feature-text {
  font-size: 1rem;
  font-weight: 500;
}

/* 对比筛选器 */
.comparison-filters {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 1px solid #e1e5e9;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filters-header h2 {
  color: #2c3e50;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.filter-actions {
  display: flex;
  gap: 1rem;
}

.filter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 500;
  color: #34495e;
  font-size: 0.9rem;
}

.filter-group select {
  padding: 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.filter-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 按钮样式 */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.btn-success {
  background: #27ae60;
  color: white;
}

.btn-success:hover {
  background: #229954;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* 软件列表区域 */
.software-list {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.view-toggle {
  display: flex;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 0.25rem;
}

.view-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #7f8c8d;
}

.view-btn.active {
  background: white;
  color: #2c3e50;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 网格视图 */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.software-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e1e5e9;
  transition: all 0.3s ease;
  position: relative;
}

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

.software-card.selected {
  border-color: #3498db;
  box-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.software-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.software-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.software-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #e8f4fd;
  color: #3498db;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.software-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.rating-stars {
  color: #f39c12;
  font-size: 1.1rem;
}

.rating-score {
  font-weight: 600;
  color: #2c3e50;
}

.rating-count {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.software-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #27ae60;
  margin-bottom: 1rem;
}

.price-period {
  font-size: 0.9rem;
  color: #7f8c8d;
  font-weight: 400;
}

.software-features {
  margin-bottom: 1.5rem;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  padding: 0.25rem 0;
  color: #7f8c8d;
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.5rem;
}

.features-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #27ae60;
  font-weight: bold;
}

.card-actions {
  display: flex;
  gap: 1rem;
}

.select-checkbox {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* 表格视图 */
.software-table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e1e5e9;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e1e5e9;
}

.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid #e1e5e9;
  vertical-align: top;
}

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

.table-software-name {
  font-weight: 600;
  color: #2c3e50;
}

.table-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.table-features {
  font-size: 0.9rem;
  color: #7f8c8d;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

/* 详细对比 */
.detailed-comparison {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e1e5e9;
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e1e5e9;
}

.comparison-header h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 200px repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.comparison-category {
  font-weight: 600;
  color: #2c3e50;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.comparison-item {
  padding: 1rem;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background: white;
}

.comparison-software {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.feature-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.score-bar {
  flex: 1;
  height: 8px;
  background: #e1e5e9;
  border-radius: 4px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.score-fill.excellent {
  background: #27ae60;
}

.score-fill.good {
  background: #f39c12;
}

.score-fill.average {
  background: #e67e22;
}

.score-fill.poor {
  background: #e74c3c;
}

.score-text {
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 60px;
}

/* 选择指南 */
.selection-guide {
  margin-bottom: 3rem;
}

.selection-guide h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

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

.guide-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e1e5e9;
  text-align: center;
  transition: all 0.3s ease;
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.guide-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.guide-card h3 {
  color: #2c3e50;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.guide-card p {
  color: #7f8c8d;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.guide-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.guide-card li {
  padding: 0.5rem 0;
  color: #7f8c8d;
  position: relative;
  padding-left: 1.5rem;
}

.guide-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #3498db;
  font-weight: bold;
}

/* 评测标准 */
.evaluation-criteria {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e1e5e9;
}

.evaluation-criteria h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

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

.criteria-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.criteria-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 12px;
  flex-shrink: 0;
}

.criteria-content h3 {
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.criteria-content p {
  color: #7f8c8d;
  line-height: 1.6;
  margin: 0;
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #7f8c8d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e1e5e9;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 1rem;
}

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

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #7f8c8d;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  color: #95a5a6;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  
  .header-features {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filters-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .software-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .guide-grid {
    grid-template-columns: 1fr;
  }
  
  .criteria-grid {
    grid-template-columns: 1fr;
  }
  
  .software-table {
    overflow-x: auto;
  }
  
  .comparison-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .software-card {
    padding: 1.5rem;
  }
  
  .card-actions {
    flex-direction: column;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem;
  }
  
  .criteria-item {
    flex-direction: column;
    text-align: center;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .comparison-filters,
  .software-card,
  .software-table,
  .detailed-comparison,
  .guide-card,
  .evaluation-criteria {
    background: #2c3e50;
    border-color: #34495e;
    color: #ecf0f1;
  }
  
  .filters-header h2,
  .section-header h2,
  .comparison-header h2,
  .selection-guide h2,
  .evaluation-criteria h2,
  .software-name,
  .table-software-name {
    color: #ecf0f1;
  }
  
  .filter-group select {
    background: #34495e;
    border-color: #4a5f7a;
    color: #ecf0f1;
  }
  
  .comparison-table th {
    background: #34495e;
  }
  
  .comparison-table tr:hover {
    background: #34495e;
  }
  
  .software-logo,
  .criteria-icon,
  .comparison-category,
  .comparison-software {
    background: #34495e;
  }
  
  .view-toggle {
    background: #34495e;
  }
  
  .view-btn.active {
    background: #4a5f7a;
    color: #ecf0f1;
  }
}