/* ===== 基础样式 ===== */
:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    font-weight: 500;
}

/* ===== 按钮样式 ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== 主横幅 ===== */
.hero {
    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: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-actions .btn-outline {
    border-color: white;
    color: white;
}

.hero-actions .btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* ===== 通用区块样式 ===== */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
}

.date-display {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
}

/* ===== 赛事筛选 ===== */
.league-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* ===== 赛事卡片 ===== */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.match-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.match-league {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.team-home {
    justify-content: flex-end;
    text-align: right;
}

.team-away {
    justify-content: flex-start;
    text-align: left;
}

.team-logo {
    width: 40px;
    height: 40px;
}

.team-name {
    font-weight: 500;
}

.match-time {
    padding: 0 20px;
    text-align: center;
}

.match-time .time {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.match-time .status {
    font-size: 12px;
    color: var(--text-light);
}

.match-prediction {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.prediction-title {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-light);
}

.prediction-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.predicted-score {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.confidence {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.confidence.high {
    background: #d4edda;
    color: #155724;
}

.confidence.medium {
    background: #fff3cd;
    color: #856404;
}

.confidence.low {
    background: #f8d7da;
    color: #721c24;
}

/* ===== 实时比分 ===== */
.live-score-section {
    background: var(--bg-color);
}

.live-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.live-scores-container {
    display: grid;
    gap: 15px;
}

.live-match {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.live-match:hover {
    background: white;
    box-shadow: var(--shadow);
}

.live-match-info {
    flex: 1;
}

.live-score {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0 30px;
}

.live-time {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 500;
}

/* ===== 分析卡片 ===== */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.analysis-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.analysis-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.analysis-card.featured {
    grid-column: span 2;
}

.analysis-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.analysis-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.analysis-content {
    padding: 20px;
}

.analysis-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.analysis-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

.analysis-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.analyst {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analyst-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.analyst-name {
    font-size: 14px;
    font-weight: 500;
}

.analysis-date {
    font-size: 12px;
    color: var(--text-light);
}

.prediction-box {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.prediction-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.prediction-item:last-child {
    margin-bottom: 0;
}

.prediction-label {
    color: var(--text-light);
    font-size: 14px;
}

.prediction-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== 专家卡片 ===== */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.expert-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.expert-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.expert-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.expert-info {
    flex: 1;
}

.expert-name {
    font-size: 18px;
    margin-bottom: 5px;
}

.expert-title {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.expert-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--primary-color);
}

.expert-prediction {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.prediction-match {
    margin-bottom: 10px;
}

.teams {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.prediction-score {
    font-size: 14px;
    color: var(--primary-color);
}

.prediction-odds {
    display: flex;
    gap: 10px;
    font-size: 12px;
}

.odd {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ===== 历史战绩表格 ===== */
.historical-records {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
}

.records-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.records-table {
    overflow-x: auto;
}

.records-table table {
    width: 100%;
    border-collapse: collapse;
}

.records-table th,
.records-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.records-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.records-table tr:hover {
    background: var(--bg-light);
}

/* ===== 社区区块 ===== */
.community-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.post-form-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.form-title {
    font-size: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.error-message {
    color: var(--accent-color);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.post-meta {
    flex: 1;
}

.post-author {
    font-size: 16px;
    margin-bottom: 3px;
}

.post-time {
    font-size: 12px;
    color: var(--text-light);
}

.post-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.post-content {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: var(--bg-light);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.post-actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary-color);
}

.action-btn .icon {
    font-size: 18px;
}

.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.comment-text {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== 专家问答 ===== */
.qa-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.qa-title {
    font-size: 24px;
    margin-bottom: 25px;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.qa-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
}

.qa-question,
.qa-answer {
    margin-bottom: 15px;
}

.qa-question:last-child,
.qa-answer:last-child {
    margin-bottom: 0;
}

.question-label,
.answer-label {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 5px;
}

.answer-expert {
    display: block;
    text-align: right;
    font-style: italic;
    color: var(--text-light);
    font-size: 14px;
    margin-top: 10px;
}

/* ===== 关于我们 ===== */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-light);
}

.features-list {
    display: grid;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 32px;
}

.feature-content h4 {
    margin-bottom: 5px;
}

.feature-content p {
    font-size: 14px;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .stat-number {
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== 页脚 ===== */
.footer {
    background: #1a252f;
    color: white;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-text {
    color: #bdc3c7;
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: #bdc3c7;
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-title {
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.modal-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.modal-footer-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ===== 消息提示 ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 30px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--primary-color);
}

.toast.error {
    border-left: 4px solid var(--accent-color);
}

.toast.warning {
    border-left: 4px solid #f39c12;
}

/* ===== 动画 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

/* ===== 加载更多 ===== */
.load-more {
    text-align: center;
    margin-top: 40px;
}

/* ===== 响应式占位符 ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-card.featured {
        grid-column: span 1;
    }
    
    .community-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .qa-grid {
        grid-template-columns: 1fr;
    }
}
