/* ============================================
   足球赛事情报网 - 主样式文件
   ============================================ */

/* CSS 变量定义 */
:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: bold;
}

.logo-icon {
    font-size: 32px;
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 20px;
    padding: 5px 15px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 5px;
    outline: none;
    width: 150px;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-login {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-register {
    background: var(--primary-color);
    color: white;
}

.btn-login:hover {
    background: var(--primary-color);
    color: white;
}

.btn-register:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* 英雄横幅 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* 区块通用样式 */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 32px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.more-link:hover {
    color: var(--primary-dark);
}

.bg-light {
    background: var(--bg-light);
}

/* 新闻网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-content {
    padding: 20px;
}

.news-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.news-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 比赛过滤器 */
.matches-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 比赛列表 */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.match-card:hover {
    box-shadow: var(--shadow-md);
}

.match-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.match-time {
    text-align: center;
    min-width: 80px;
}

.match-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.match-clock {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: bold;
}

.teams {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 2;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.team-name {
    font-weight: 500;
}

.vs {
    font-weight: bold;
    color: var(--text-secondary);
    padding: 0 15px;
}

.score {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.match-status {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.status-live {
    background: #fee;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.status-finished {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.status-upcoming {
    background: #e8f5e9;
    color: var(--primary-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 球队表格 */
.league-selector {
    margin-bottom: 20px;
}

.league-select {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: var(--bg-white);
    cursor: pointer;
}

.teams-table-wrapper {
    overflow-x: auto;
}

.teams-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    border-radius: 12px;
    overflow: hidden;
}

.teams-table th,
.teams-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.teams-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-primary);
}

.teams-table tr:hover {
    background: var(--bg-light);
}

.rank {
    font-weight: bold;
    font-size: 18px;
}

.rank-1 { color: #f1c40f; }
.rank-2 { color: #95a5a6; }
.rank-3 { color: #cd7f32; }

.team-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 预测卡片 */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.prediction-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.prediction-card:hover {
    box-shadow: var(--shadow-md);
}

.prediction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.prediction-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.prediction-match {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.prediction-teams {
    font-weight: 600;
    font-size: 18px;
}

.prediction-result {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.prediction-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.prediction-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.prediction-confidence {
    margin-top: 15px;
    text-align: center;
}

.confidence-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

/* CTA 区域 */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 60px 0;
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.btn-cta {
    padding: 15px 40px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* 页脚 */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer p {
    color: #aaa;
    line-height: 1.8;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-block;
    padding: 8px 15px;
    background: #333;
    border-radius: 20px;
    font-size: 14px;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #666;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal h2 {
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    font-size: 14px;
    text-decoration: none;
}

.btn-submit {
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.form-tip {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-tip a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: slideInRight 0.3s ease;
}

.toast-success {
    border-left: 4px solid var(--primary-color);
}

.toast-error {
    border-left: 4px solid var(--accent-color);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
