/* 
 * 江苏城市足球联赛 - 样式文件
 * 作者：Jenius智能AI
 * 日期：2025-04-07
 * 描述：绿茵主题足球联赛应用样式，包含响应式设计和UI组件
 */

/* 基础重置和变量定义 */
:root {
  --primary-color: #2e7d32;  /* 绿茵主色调 */
  --secondary-color: #43a047;
  --accent-color: #ffab00;   /* 强调色 */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #f8f9fa;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  background-color: var(--background-light);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
.header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  display: inline-block;
  background: linear-gradient(to right, #ffffff, #ffeb3b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav ul {
  display: flex;
  list-style: none;
  margin-top: 0.5rem;
}

.nav li {
  margin-right: 1.5rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s;
}

.nav a:hover, .nav a.active {
  color: var(--text-light);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* 英雄区域 */
.hero {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                    url('https://statics.jenius.cn/attachments/default-football-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  text-align: center;
  padding: 5rem 1rem;
  margin-bottom: 2rem;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* 内容区块通用样式 */
.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  color: var(--primary-color);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 0.5rem auto 0;
}

/* 赛程筛选区域 */
.schedule-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 500;
}

.filter-group input {
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
}

.btn {
  background-color: var(--secondary-color);
  color: var(--text-light);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* 赛程列表样式 */
.schedule-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.match-day {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
}

.match-day:last-child {
  border-bottom: none;
}

.match-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.match-date::before {
  content: '📅';
  font-size: 1.2rem;
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.match-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  transition: all 0.3s;
}

.match-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.match-info {
  flex: 1;
  text-align: center;
}

.match-time {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.match-status {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  display: inline-block;
}

.status-scheduled {
  background-color: #e0f7fa;
  color: #006064;
}

.status-in-progress {
  background-color: #fff8e1;
  color: #ff8f00;
}

.status-completed {
  background-color: #e8f5e9;
  color: var(--success-color);
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 35%;
}

.team-name {
  font-weight: 500;
  margin-top: 0.5rem;
  text-align: center;
}

.team-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  background-color: white;
  padding: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 40px;
  text-align: center;
}

/* 排名表格样式 */
.ranking-container {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.ranking-table th {
  background-color: var(--primary-color);
  color: var(--text-light);
  text-align: left;
  padding: 1rem;
  font-weight: 500;
}

.ranking-table th:first-child {
  border-top-left-radius: 8px;
}

.ranking-table th:last-child {
  border-top-right-radius: 8px;
}

.ranking-table tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.ranking-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.ranking-table tr:hover {
  background-color: #e8f5e9;
}

.ranking-table td {
  padding: 1rem;
}

.ranking-table .team-cell {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* 参赛球队样式 */
.teams-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  text-align: center;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.team-card-header {
  background-color: var(--secondary-color);
  padding: 1rem;
  color: var(--text-light);
}

.team-card-body {
  padding: 1.5rem 1rem;
}

.team-card-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: white;
  padding: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(46, 125, 50, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* 消息提示组件 */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 350px;
}

.toast {
  background-color: white;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: slideIn 0.3s, fadeOut 0.5s 2.5s;
}

.toast.error {
  border-left-color: var(--error-color);
}

.toast.success {
  border-left-color: var(--success-color);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* 页脚样式 */
.footer {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .match-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .nav ul {
    margin-top: 1rem;
    justify-content: center;
  }
  
  .hero {
    padding: 3rem 1rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .schedule-filter {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    margin-bottom: 1rem;
  }
  
  .match-list {
    grid-template-columns: 1fr;
  }
  
  .teams-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }
  
  .nav li {
    margin-right: 1rem;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .team {
    width: 30%;
  }
  
  .team-logo {
    width: 40px;
    height: 40px;
  }
  
  .teams-container {
    grid-template-columns: 1fr;
  }
}