/* 
  ztiyu.com - 台灣中華職棒 CPBL 風格
  配色: 活力棒球風格，融合台灣本地特色
*/

/* ===== CSS Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 主色調 - 台灣棒球熱血風格 */
  --color-bg: #f0ebe3;
  --color-bg-secondary: #e8e0d5;
  --color-card: #ffffff;
  --color-border: #d4cbbf;
  --color-text: #2d2a24;
  --color-text-muted: #7a7266;
  --color-text-light: #a09888;
  
  /* CPBL 棒球主色 */
  --color-primary: #e63946;
  --color-primary-hover: #c1121f;
  --color-secondary: #1d3557;
  --color-accent: #f4a261;  /* 台灣味 - 橘色 */
  --color-gold: #e9c46a;
  --color-green: #2a9d8f;
  
  /* 球隊代表色 */
  --color-team-兄弟: #fbb040;
  --color-team-統一: #ff6600;
  --color-team-樂天: #e31837;
  --color-team-富邦: #0066cc;
  --color-team-味全: #b22222;
  --color-team-台鋼: #007f5f;
  
  /* 漸層 */
  --gradient-hero: linear-gradient(135deg, #1d3557 0%, #e63946 100%);
  --gradient-card: linear-gradient(135deg, #e63946 0%, #f4a261 100%);
  --gradient-warm: linear-gradient(135deg, #f4a261 0%, #e9c46a 100%);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
  
  /* Container */
  --container-max: 1280px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ===== Utilities ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-balance { text-wrap: balance; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.375rem; }
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient-hero);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__logo-icon {
  width: 40px;
  height: 40px;
  background: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--color-secondary);
  transform: rotate(-10deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.header__logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.05em;
}

.header__logo-text span {
  color: var(--color-gold);
}

.header__nav {
  display: none;
}

.header__nav-list {
  display: flex;
  gap: var(--spacing-lg);
}

.header__nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
  transition: all 0.25s;
}

.header__nav-link:hover,
.header__nav-link--active {
  color: #fff;
  border-bottom-color: var(--color-gold);
}

.header__mobile-toggle {
  display: flex;
  padding: var(--spacing-sm);
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
}

@media (min-width: 768px) {
  .header__nav { display: block; }
  .header__mobile-toggle { display: none; }
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-secondary);
  border-bottom: 2px solid var(--color-primary);
  padding: var(--spacing-md);
  z-index: 99;
}

.mobile-nav--open { display: block; }

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.mobile-nav__link {
  display: block;
  padding: var(--spacing-sm) 0;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-secondary);
  color: rgba(255,255,255,0.85);
  margin-top: auto;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-card);
}

.footer__inner {
  padding: var(--spacing-2xl) var(--spacing-lg);
}

@media (min-width: 768px) {
  .footer__inner { padding: var(--spacing-2xl) var(--spacing-xl); }
}

@media (min-width: 1024px) {
  .footer__inner { padding: var(--spacing-2xl) 0; }
}

.footer__grid {
  display: grid;
  gap: var(--spacing-xl);
}

@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer__brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.footer__brand-name span { color: var(--color-gold); }

.footer__brand-desc {
  margin-top: var(--spacing-md);
  font-size: 0.875rem;
  opacity: 0.7;
  line-height: 1.7;
}

.footer__title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer__link {
  font-size: 0.875rem;
  opacity: 0.7;
  transition: all 0.2s;
}

.footer__link:hover {
  opacity: 1;
  color: var(--color-gold);
  padding-left: 4px;
}

.footer__bottom {
  padding: var(--spacing-lg) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  gap: 0.5rem;
}

.btn--primary {
  background: var(--gradient-card);
  color: white;
  box-shadow: 0 4px 12px rgba(230,57,70,0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.4);
}

.btn--secondary {
  background: var(--color-secondary);
  color: white;
}

.btn--secondary:hover {
  background: #152740;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
}

.btn--outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn--sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  min-height: 420px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(244,162,97,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(233,196,106,0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(230,57,70,0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* 棒球裝飾元素 */
.hero::after {
  content: '⚾';
  position: absolute;
  font-size: 200px;
  right: -30px;
  bottom: -40px;
  opacity: 0.08;
  transform: rotate(20deg);
  pointer-events: none;
}

@media (min-width: 768px) {
  .hero::after {
    font-size: 300px;
    right: -50px;
    bottom: -60px;
  }
}

.hero__inner {
  position: relative;
  padding: var(--spacing-3xl) var(--spacing-md);
  text-align: center;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero__inner { padding: 5rem var(--spacing-md); }
}

.hero__tagline {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.05em;
}

.hero__title {
  color: #fff;
  margin-bottom: var(--spacing-md);
  font-size: 2.5rem;
}

@media (min-width: 768px) {
  .hero__title { font-size: 3.5rem; }
}

.hero__desc {
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: center;
}

@media (min-width: 640px) {
  .hero__actions { flex-direction: row; justify-content: center; }
}

/* ===== Stats Bar ===== */
.stats-bar {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.stats-bar__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  padding: var(--spacing-xl) var(--spacing-md);
}

@media (min-width: 768px) {
  .stats-bar__inner { grid-template-columns: repeat(4, 1fr); }
}

.stats-bar__item { text-align: center; }

.stats-bar__number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-card);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stats-bar__label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
  font-weight: 500;
}

/* ===== Sections ===== */
.section { padding: var(--spacing-2xl) 0; }

@media (min-width: 768px) {
  .section { padding: var(--spacing-3xl) 0; }
}

.section--alt {
  background: var(--color-bg-secondary);
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

@media (min-width: 640px) {
  .section__header { flex-direction: row; justify-content: space-between; align-items: center; }
}

.section__title {
  position: relative;
  margin-bottom: var(--spacing-xs);
}

.section__title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--gradient-card);
  border-radius: 2px;
  margin-top: var(--spacing-sm);
}

.text-center .section__title::after {
  margin-left: auto;
  margin-right: auto;
}

.section__desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.section__link {
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.section__link:hover { gap: 0.5rem; }

/* ===== Cards ===== */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__body { padding: var(--spacing-lg); }

.card__title {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.card__tag {
  background: rgba(230,57,70,0.1);
  color: var(--color-primary);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.card__date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

.card__author {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* ===== News Grid ===== */
.news-grid {
  display: grid;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  padding-top: var(--spacing-lg);
}

.breadcrumb__separator { color: var(--color-border); }

.breadcrumb__link { transition: color 0.2s; }
.breadcrumb__link:hover { color: var(--color-primary); }

.breadcrumb__current { color: var(--color-text); font-weight: 500; }

/* ===== Page Header ===== */
.page-header {
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-gold)) 1;
  margin-bottom: var(--spacing-xl);
}

.page-header__title { margin-bottom: var(--spacing-sm); }

.page-header__desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ===== Team Matchup Page Styles ===== */

/* Team vs Team Header */

.matchup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-2xl) 0;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .matchup-header {
    gap: var(--spacing-md);
    padding: var(--spacing-xl) 0;
  }
  .matchup-team {
    min-width: 80px;
  }
  .matchup-team__logo {
    width: 60px;
    height: 60px;
    font-size: 1.1rem;
    overflow: hidden;
  }
  .matchup-team__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .matchup-team__name {
    font-size: 0.85rem;
  }
  .matchup-team__record {
    font-size: 0.75rem;
  }
  .matchup-vs {
    font-size: 1.2rem;
  }
}

.matchup-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  min-width: 140px;
}

.matchup-team__logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.matchup-team__name {
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
}

.matchup-team__record {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.matchup-vs {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
  font-style: italic;
  text-shadow: 2px 2px 0 rgba(230,57,70,0.15);
}

@media (min-width: 768px) {
  .matchup-vs { font-size: 2.5rem; }
  .matchup-team__logo { width: 100px; height: 100px; font-size: 1.75rem; }
}

/* Matchup Tabs */
.matchup-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--spacing-sm);
}

.matchup-tab {
  padding: 0.6rem 1.25rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.matchup-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.matchup-tab--active {
  background: var(--gradient-card);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(230,57,70,0.3);
}

/* Season Selector */
.season-selector {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.season-selector__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.season-selector__buttons {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.season-btn {
  padding: 0.4rem 0.9rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.season-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.season-btn--active {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

/* Head-to-Head Stats Summary */
.h2h-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.h2h-stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}

.h2h-stat-card:hover {
  transform: translateY(-2px);
}

.h2h-stat-card__label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
}

.h2h-stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-card);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.h2h-stat-card__sub {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: var(--spacing-xs);
}

/* Matchup Table */
.matchup-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--spacing-xl);
}

.matchup-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  font-size: 0.875rem;
  min-width: 700px;
}

.matchup-table thead {
  background: var(--color-secondary);
}

.matchup-table th {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 3px solid var(--color-primary);
}

.matchup-table th:first-child,
.matchup-table td:first-child {
  text-align: left;
  font-weight: 600;
  padding-left: 1.25rem;
  min-width: 120px;
}

.matchup-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(212,203,191,0.4);
}

.matchup-table tbody tr:hover td {
  background: rgba(230,57,70,0.04);
}

.matchup-table tbody tr:nth-child(even) td {
  background: rgba(240,235,227,0.5);
}

.matchup-table tbody tr:nth-child(even):hover td {
  background: rgba(230,57,70,0.06);
}

/* Win/Loss indicators */
.win { color: var(--color-green); font-weight: 700; }
.loss { color: var(--color-primary); font-weight: 700; }
.draw { color: var(--color-accent); font-weight: 600; }

/* Series Result Badge */
.series-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.series-badge--win {
  background: rgba(42,157,143,0.12);
  color: var(--color-green);
}

.series-badge--loss {
  background: rgba(230,57,70,0.1);
  color: var(--color-primary);
}

.series-badge--draw {
  background: rgba(244,162,97,0.12);
  color: var(--color-accent);
}

/* Charts Section */
.chart-section {
  margin-bottom: var(--spacing-2xl);
}

.chart-container {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-card);
}

.chart-title {
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  font-size: 1rem;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.bar-chart__item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.bar-chart__label {
  width: 120px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}

.bar-chart__track {
  flex: 1;
  height: 28px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.bar-chart__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  min-width: 40px;
}

.bar-chart__fill--team1 { background: linear-gradient(90deg, var(--color-primary), #ff6b6b); }
.bar-chart__fill--team2 { background: linear-gradient(90deg, var(--color-secondary), #457b9d); }
.bar-chart__fill--draw { background: linear-gradient(90deg, var(--color-accent), var(--color-gold)); }

/* Venue Split */
.venue-grid {
  display: grid;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .venue-grid { grid-template-columns: repeat(2, 1fr); }
}

.venue-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-card);
}

.venue-card__title {
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.venue-card__record {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.venue-stat {
  text-align: center;
}

.venue-stat__value {
  font-size: 1.5rem;
  font-weight: 800;
}

.venue-stat__label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
}

/* ===== About Page ===== */
.about-grid {
  display: grid;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .about-grid { grid-template-columns: repeat(4, 1fr); }
}

.about-card {
  padding: var(--spacing-xl);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.about-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230,57,70,0.1);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  font-size: 1.5rem;
}

.about-card__title {
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.about-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent), var(--color-gold));
  border-radius: 2px;
}

.timeline__item {
  position: relative;
  padding-bottom: var(--spacing-xl);
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
  border-radius: 50%;
  transform: translateX(-50%);
}

.timeline__year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.timeline__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== Contact Form ===== */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group { margin-bottom: var(--spacing-lg); }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

/* ===== Contact Info ===== */
.contact-info {
  display: grid;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

@media (min-width: 768px) {
  .contact-info {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-info__item {
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
}

.contact-info__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-info__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230,57,70,0.1);
  border-radius: 50%;
  color: var(--color-primary);
  font-size: 1.3rem;
}

.contact-info__title {
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.contact-info__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ===== Standings Table (Homepage) ===== */
.standings {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.standings__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.standings__table--responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.standings__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 500px;
}

.standings__table thead {
  background: var(--color-bg-secondary);
}

.standings__table th {
  padding: 0.6rem 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--color-border);
}

.standings__table th:first-child,
.standings__table td:first-child {
  text-align: center;
}

.standings__table th:nth-child(2),
.standings__table td:nth-child(2) {
  text-align: left;
}

.standings__table td {
  padding: 0.6rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(212,203,191,0.3);
  font-weight: 500;
}

.standings__table tbody tr:hover td {
  background: rgba(230,57,70,0.04);
}

.standings__table tbody tr:nth-child(even) td {
  background: rgba(240,235,227,0.4);
}

/* ===== Team Selector (Matchup Page) ===== */
.team-selector {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-card);
}

.team-selector__label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
}

.team-selector__row {
  display: flex;
  align-items: flex-end;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.team-selector__group {
  flex: 1;
  min-width: 160px;
}

.team-selector__team-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-selector__select {
  width: 100%;
}

.team-selector__vs {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary);
  padding: 0 0.5rem;
  padding-top: 1.25rem;
}

/* ===== FAQ (Contact Page) ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.faq-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item__question {
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: '+';
  margin-left: auto;
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 700;
  transition: transform 0.2s;
}

details[open] .faq-item__question::after {
  content: '−';
}

.faq-item__answer {
  padding: 0 var(--spacing-lg) var(--spacing-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero__title { font-size: 1.75rem; }
  .matchup-team__logo { width: 60px; height: 60px; font-size: 1.1rem; }
  .matchup-team__name { font-size: 0.85rem; }
  .matchup-vs { font-size: 1.5rem; }
  .h2h-stat-card__value { font-size: 1.4rem; }
  .stats-bar__number { font-size: 1.5rem; }
  .page-header__title { font-size: 1.5rem; }
}

/* ===== Animation ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-light); }

/* ===== 移动端样式修复 - 针对味全龙vs中信兄弟对战记录页面 ===== */
/* 仅修改移动端显示错位问题，保留其他所有样式 */

/* 基础移动端适配 */
@media (max-width: 768px) {
  /* 修复头部布局错位 */
  .header__inner {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }
  
  .header__logo {
    margin-right: auto;
  }
  
  /* 修复对战头部VS区域错位 */
  .matchup-header {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .matchup-team {
    flex: 1;
    min-width: 120px;
  }
  
  .matchup-vs {
    font-size: 1.25rem;
    padding: 0 0.5rem;
  }
  
  /* 修复赛季选择器按钮换行错位 */
  .season-selector {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
  }
  
  .season-selector__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .season-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-width: 60px;
  }
  
  /* 修复H2H统计卡片网格错位 */
  .h2h-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
  }
  
  .h2h-stat-card {
    padding: 0.75rem 0.5rem;
    text-align: center;
  }
  
  /* 修复选项卡导航错位 */
  .matchup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
  }
  
  .matchup-tab {
    flex: 1;
    min-width: calc(50% - 0.5rem);
    padding: 0.625rem 0.25rem;
    font-size: 0.75rem;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
  }
  
  /* 修复表格横向滚动 */
  .matchup-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
  }
  
  .matchup-table {
    min-width: 600px;
    font-size: 0.8125rem;
  }
  
  .matchup-table th,
  .matchup-table td {
    padding: 0.625rem 0.5rem;
    white-space: nowrap;
  }
  
  /* 修复图表区域布局 */
  .bar-chart__item {
    margin-bottom: 1rem;
  }
  
  .bar-chart__label {
    min-width: 90px;
    font-size: 0.875rem;
  }
  
  /* 修复主客场表现网格 */
  .venue-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .venue-card {
    width: 100%;
    margin: 0;
  }
  
  .venue-card__record {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
  
  .venue-stat {
    padding: 0.5rem;
  }
  
  .venue-stat__value {
    font-size: 1.125rem;
  }
  
  .venue-stat__label {
    font-size: 0.75rem;
  }
  
  /* 修复总结区域 */
  #summary-section .chart-container {
    padding: 1rem;
  }
  
  #summary-section p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    word-break: break-word;
  }
  
  /* 修复页脚网格 */
  .footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer__brand-name {
    font-size: 1.25rem;
  }
  
  .footer__brand-desc {
    font-size: 0.8125rem;
    max-width: 100%;
  }
  
  .footer__title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
  }
  
  .footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .footer__links li {
    display: inline-block;
  }
  
  /* 修复页面头部 */
  .page-header__title {
    font-size: 1.25rem;
    line-height: 1.4;
    word-break: break-word;
  }
  
  .page-header__desc {
    font-size: 0.875rem;
  }
  
  /* 修复容器内边距 */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* 修复面包屑导航 */
  .breadcrumb {
    font-size: 0.8125rem;
    margin: 0.75rem 0;
  }
  
  /* 修复章节间距 */
  .section {
    padding: 1rem 0;
  }
  
  /* 修复图表标题 */
  .chart-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  /* 确保图片不溢出 */
  .matchup-team__logo img {
    max-width: 100%;
    height: auto;
  }
  
  /* 修复VS标志在小屏幕上的显示 */
  @media (max-width: 480px) {
    .matchup-team__logo {
      width: 60px;
      height: 60px;
    }
    
    .matchup-team__name {
      font-size: 0.875rem;
    }
    
    .matchup-team__record {
      font-size: 0.75rem;
    }
    
    .matchup-vs {
      font-size: 1rem;
    }
    
    .season-btn {
      padding: 0.4rem 0.75rem;
      font-size: 0.8125rem;
    }
    
    .matchup-tab {
      font-size: 0.6875rem;
      padding: 0.5rem 0.25rem;
    }
    
    .venue-stat__value {
      font-size: 1rem;
    }
  }
}

/* 平板设备额外优化 */
@media (min-width: 481px) and (max-width: 768px) {
  .venue-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }
  
  .footer__links {
    justify-content: flex-start;
  }
  
  .matchup-tab {
    min-width: auto;
    flex: 0 0 auto;
  }
}