/* 赛事解读页面专用样式 */

/* ===== 基础变量定义 ===== */
:root {
  --primary-blue: #3498db;
  --primary-green: #2ecc71;
  --primary-orange: #f39c12;
  --primary-purple: #9b59b6;
  --primary-red: #e74c3c;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-light: #e1e8ed;
  --shadow-light: 0 2px 12px rgba(44, 62, 80, 0.08);
  --shadow-medium: 0 8px 32px rgba(44, 62, 80, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --border-radius-large: 16px;
}

/* ===== 页面整体布局 ===== */
.analysis-container {
  min-height: 100vh;
  background: var(--bg-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 搜索框样式 ===== */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 32px;
}

.search-input {
  width: 280px;
  padding: 12px 48px 12px 16px;
  border: 2px solid var(--border-light);
  border-radius: 24px;
  font-size: 14px;
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-btn {
  position: absolute;
  right: 8px;
  background: var(--primary-blue);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: #2980b9;
  transform: scale(1.05);
}

/* ===== 页面标题区域 ===== */
.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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.3;
}

.page-title {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.page-title i {
  margin-right: 16px;
  color: #ffd700;
}

.page-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ===== 学科分类导航 ===== */
.subject-navigation {
  background: var(--bg-white);
  padding: 32px 0;
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 80px;
  z-index: 100;
}

.subject-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subject-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid var(--border-light);
  border-radius: 32px;
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  min-width: 120px;
  justify-content: center;
}

.subject-tab:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-light);
}

.subject-tab.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
  box-shadow: var(--shadow-medium);
}

.subject-tab i {
  font-size: 18px;
}

/* 不同学科的主题色 */
.subject-tab[data-subject="math"].active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.subject-tab[data-subject="science"].active {
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.subject-tab[data-subject="programming"].active {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
}

.subject-tab[data-subject="english"].active {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
}

.subject-tab[data-subject="chinese"].active {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

/* ===== 学科简介区域 ===== */
.subject-intro {
  padding: 48px 0;
  background: var(--bg-light);
}

.intro-content {
  background: var(--bg-white);
  border-radius: var(--border-radius-large);
  padding: 40px;
  box-shadow: var(--shadow-light);
  border-left: 6px solid var(--primary-blue);
}

.intro-content h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.intro-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 16px;
}

.intro-content ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.intro-content li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-light);
  line-height: 1.6;
}

.intro-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-green);
  font-weight: bold;
}

/* ===== 对比表格区域 ===== */
.comparison-section {
  padding: 60px 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 2.4rem;
  color: var(--text-dark);
  margin-bottom: 16px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.table-container {
  background: var(--bg-white);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-blue) var(--bg-light);
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-light);
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: 4px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 800px;
}

.comparison-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table th:first-child {
  border-top-left-radius: var(--border-radius-large);
}

.comparison-table th:last-child {
  border-top-right-radius: var(--border-radius-large);
}

.comparison-table td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  line-height: 1.6;
}

.comparison-table tbody tr {
  transition: var(--transition);
}

.comparison-table tbody tr:hover {
  background: rgba(52, 152, 219, 0.05);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* 竞赛名称列样式 */
.competition-name {
  font-weight: 600;
  color: var(--primary-blue);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.competition-name:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* 级别标签样式 */
.level-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.level-badge.international {
  background: rgba(231, 76, 60, 0.1);
  color: var(--primary-red);
  border: 1px solid rgba(231, 76, 60, 0.2);
}

.level-badge.national {
  background: rgba(52, 152, 219, 0.1);
  color: var(--primary-blue);
  border: 1px solid rgba(52, 152, 219, 0.2);
}

.level-badge.regional {
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary-green);
  border: 1px solid rgba(46, 204, 113, 0.2);
}

/* 升学价值评级样式 */
.value-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.value-star {
  color: #ffd700;
  font-size: 16px;
}

.value-star.empty {
  color: var(--border-light);
}

/* ===== 搜索结果区域 ===== */
.search-results {
  text-align: center;
  padding: 60px 0;
}

.no-results {
  max-width: 400px;
  margin: 0 auto;
}

.no-results i {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

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

.no-results p {
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== FAQ区域 ===== */
.faq-section {
  padding: 60px 0;
  background: var(--bg-white);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.faq-item {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.faq-question:hover {
  background: rgba(52, 152, 219, 0.05);
}

.faq-question i {
  color: var(--primary-blue);
  font-size: 14px;
  transition: var(--transition);
}

.faq-item.active .faq-question i {
  transform: rotate(90deg);
}

.faq-question h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--bg-white);
}

.faq-item.active .faq-answer {
  padding: 24px;
  max-height: 500px;
}

.faq-answer p {
  margin: 0 0 16px 0;
  color: var(--text-light);
  line-height: 1.6;
}

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

.faq-answer li {
  margin-bottom: 8px;
  color: var(--text-light);
  line-height: 1.6;
}

.faq-answer strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ===== 页脚样式 ===== */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 32px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 20px;
  color: white;
}

.footer-section h3 {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-section h3 i {
  color: #ffd700;
}

.footer-section p {
  line-height: 1.6;
  color: #bdc3c7;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #bdc3c7;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #34495e;
  color: #bdc3c7;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }
  
  .search-container {
    margin-left: 16px;
  }
  
  .search-input {
    width: 220px;
  }
  
  .page-title {
    font-size: 2.8rem;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .search-container {
    display: none;
  }
  
  .page-header {
    padding: 60px 0 40px;
  }
  
  .page-title {
    font-size: 2.4rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .subject-tabs {
    gap: 4px;
  }
  
  .subject-tab {
    padding: 10px 16px;
    font-size: 14px;
    min-width: auto;
    flex: 1;
  }
  
  .subject-tab span {
    display: none;
  }
  
  .intro-content {
    padding: 24px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .comparison-table {
    font-size: 13px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 12px 8px;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .faq-question {
    padding: 20px;
  }
  
  .faq-item.active .faq-answer {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2rem;
  }
  
  .subject-navigation {
    padding: 20px 0;
  }
  
  .subject-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .intro-content {
    padding: 20px;
  }
  
  .comparison-section {
    padding: 40px 0;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .comparison-table {
    font-size: 12px;
    min-width: 600px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 10px 6px;
  }
  
  .faq-section {
    padding: 40px 0;
  }
  
  .footer {
    padding: 32px 0 16px;
  }
  
  .footer-content {
    gap: 24px;
  }
}

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

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

/* ===== 加载状态 ===== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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