/* ⚽ 洋哥足球比赛分析 - 样式表 */

/* ───── CSS 变量 ───── */
:root {
    --primary: #1a7c2e;
    --primary-dark: #145d22;
    --primary-light: #e8f5e9;
    --accent: #ff6f00;
    --bg: #f5f7fa;
    --bg-card: #ffffff;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --max-width: 1100px;
}

/* ───── Reset ───── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ───── 导航栏 ───── */
.navbar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none !important;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 24px;
    font-size: 0.95rem;
    text-decoration: none !important;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-links a:hover { color: white; border-bottom-color: white; }

.nav-admin {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px !important;
    border-radius: 6px;
    border-bottom: none !important;
}

.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ───── 搜索栏 ───── */
.search-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.search-form { display: flex; gap: 8px; }
.search-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s;
}
.search-form input:focus { border-color: var(--primary); }
.search-form button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}
.search-form button:hover { background: var(--primary-dark); }

/* ───── Flash 消息 ───── */
.flash-messages { margin-top: 16px; }
.flash {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ───── 主内容 ───── */
.main-content { flex: 1; padding: 32px 20px; }

/* ───── Hero ───── */
.hero {
    background: linear-gradient(135deg, #1a7c2e, #2ecc71);
    color: white;
    border-radius: var(--radius);
    padding: 48px 40px;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 12px; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }

.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ───── 文章列表 ───── */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

.card-image { height: 200px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: 20px; }
.card-meta { display: flex; gap: 12px; font-size: 0.82rem; color: var(--text-light); margin-bottom: 8px; }
.card-title { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.4; }
.card-title a { color: var(--text); text-decoration: none !important; }
.card-title a:hover { color: var(--primary); }
.card-summary { font-size: 0.9rem; color: var(--text-light); margin-bottom: 16px; line-height: 1.6; }
.card-footer { padding-top: 12px; border-top: 1px solid var(--border); }

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary) !important;
    text-decoration: none !important;
}

/* ───── 空状态 ───── */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; color: var(--text); }

/* ───── 分页 ───── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-link {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text) !important;
    text-decoration: none !important;
    transition: all 0.2s;
}
.page-link:hover { background: var(--primary); color: white !important; border-color: var(--primary); }
.page-info { font-size: 0.9rem; color: var(--text-light); }

/* ───── 文章详情页 ───── */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-header { margin-bottom: 32px; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
}
.article-title { font-size: 2rem; line-height: 1.3; margin-bottom: 12px; }
.article-summary {
    font-size: 1.05rem;
    color: var(--text-light);
    border-left: 4px solid var(--primary);
    padding-left: 16px;
}

/* ───── 链接导航卡片（赛事情报）───── */
.link-redirect-card {
    text-align: center;
    padding: 48px 32px;
    margin: 16px 0 32px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px dashed #86efac;
    border-radius: var(--radius);
}

.redirect-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.link-redirect-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.link-redirect-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.redirect-btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    margin-bottom: 16px;
}

.redirect-url {
    font-size: 0.78rem;
    color: #9ca3af;
    font-family: monospace;
    word-break: break-all;
    margin-top: 8px;
}

.article-cover {
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
}
.article-cover img { width: 100%; max-height: 400px; object-fit: cover; }

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content li { margin-bottom: 4px; }
.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--primary-light);
    border-radius: 0 8px 8px 0;
}
.article-content img { border-radius: 8px; margin: 16px 0; }
.article-content code {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}
.article-content pre {
    background: #1a1a2e;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}
.article-content pre code { background: none; padding: 0; }

.article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.share-links { font-size: 0.9rem; color: var(--text-light); }
.share-links a { margin-left: 8px; }
.back-link { font-weight: 600; }

/* ───── 点赞 + 分享 ───── */
.post-actions {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.post-action-bar {
    display: flex;
    justify-content: center;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--text);
}
.like-btn:hover:not(:disabled) {
    border-color: #ef4444;
    background: #fef2f2;
    transform: scale(1.05);
}
.like-btn.liked {
    border-color: #ef4444;
    background: #fef2f2;
    color: #dc2626;
}
.like-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.like-disabled {
    opacity: 0.4;
}
#likeIcon { font-size: 1.2rem; }
#likeCount { font-size: 1.1rem; min-width: 20px; text-align: center; }

.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.share-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}
.share-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
.share-weibo:hover { background: #fff0eb; border-color: #ff8200; color: #ff8200; }
.share-twitter:hover { background: #e8f5fe; border-color: #1da1f2; color: #1da1f2; }
.share-facebook:hover { background: #eef2ff; border-color: #1877f2; color: #1877f2; }
.share-telegram:hover { background: #e8f5fe; border-color: #0088cc; color: #0088cc; }
.share-weixin:hover { background: #f0fdf4; border-color: #07c160; color: #07c160; }
.share-qq:hover { background: #f0f5ff; border-color: #12b7f5; color: #12b7f5; }
.share-qzone:hover { background: #fff7ed; border-color: #faa90e; color: #faa90e; }
.share-douban:hover { background: #f5f5f5; border-color: #007722; color: #007722; }
.share-copy { min-width: 100px; text-align: center; }

/* ───── 关于页 ───── */
.about-page { max-width: 700px; margin: 0 auto; }
.about-page h1 { font-size: 2rem; margin-bottom: 32px; }

.about-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.about-card h2 { margin-bottom: 12px; font-size: 1.2rem; }
.about-card p { color: var(--text-light); line-height: 1.8; }
.about-card ul { padding-left: 20px; color: var(--text-light); }
.about-card li { margin-bottom: 8px; }

.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ───── 登录页 ───── */
.admin-login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}
.login-card h1 { text-align: center; margin-bottom: 24px; font-size: 1.5rem; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
    background: #fff3cd;
    padding: 8px;
    border-radius: 6px;
}

/* ───── 表单通用 ───── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }

.editor-tip {
    font-size: 0.82rem;
    color: var(--text-light);
    background: #f0fdf4;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-tip-right {
    flex-shrink: 0;
}

.btn-upload-img {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-upload-img:hover { background: var(--primary-dark); }
.btn-upload-img:disabled { opacity: 0.6; cursor: not-allowed; }

.cover-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cover-url-row input { flex: 1; }

.btn-upload {
    background: #7c3aed;
    color: white !important;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    text-decoration: none !important;
    display: inline-block;
}
.btn-upload:hover { background: #6d28d9; }
.btn-upload:disabled { opacity: 0.6; cursor: not-allowed; }

/* ───── 按钮 ───── */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-block;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white !important; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text) !important;
}
.btn-outline:hover { background: #f3f4f6; }
.btn-danger { background: #dc2626; color: white !important; }
.btn-danger:hover { background: #b91c1c; }
.btn-full { width: 100%; text-align: center; }

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ───── 管理面板 ───── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.dashboard-header h1 { font-size: 1.5rem; }
.dashboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-info {
    background: var(--primary-light);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.admin-table-wrapper { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.admin-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
}
.admin-table tr:hover { background: #f9fafb; }
.td-title { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-actions { display: flex; gap: 4px; flex-wrap: nowrap; }

.status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-online { background: #d4edda; color: #155724; }
.status-draft { background: #f3f4f6; color: #6b7280; }

.btn-sm {
    padding: 4px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-block;
}
.btn-edit { background: var(--primary); color: white !important; }
.btn-edit:hover { background: var(--primary-dark); }
.btn-toggle { background: #f59e0b; color: white; }
.btn-toggle:hover { background: #d97706; }
.btn-delete { background: #ef4444; color: white; }
.btn-delete:hover { background: #dc2626; }

/* ───── 页脚 ───── */
.footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 48px;
    padding-top: 40px;
}

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

.footer-col h4 {
    color: white;
    margin-bottom: 12px;
    font-size: 1rem;
}
.footer-col p { font-size: 0.88rem; line-height: 1.6; }
.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    margin-bottom: 6px;
    text-decoration: none !important;
}
.footer-col a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ───── 板块入口卡片（首页）───── */
.portal-section { margin-bottom: 48px; }

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portal-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    color: var(--text) !important;
    border-top: 4px solid var(--primary);
}

.portal-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); }

.portal-card .portal-icon { font-size: 2.5rem; margin-bottom: 16px; }
.portal-card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.portal-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }

.portal-news { border-top-color: #1a7c2e; }
.portal-analysis { border-top-color: #2563eb; }
.portal-tools { border-top-color: #d97706; }

.portal-count {
    font-size: 0.82rem;
    color: var(--text-light);
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 12px;
}

.portal-arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 1.3rem;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
}
.portal-card:hover .portal-arrow { opacity: 1; transform: translateX(4px); }

/* ───── 首页各板块预览 ───── */
.home-section { margin-bottom: 48px; }

.section-block { margin-bottom: 32px; }

.section-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.section-block-header h2 { font-size: 1.2rem; }

.section-more {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
}

.mini-list { display: flex; flex-direction: column; gap: 12px; }

.mini-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}
.mini-card:hover { transform: translateX(4px); }

.mini-info h3 { font-size: 1rem; margin-bottom: 4px; }
.mini-info h3 a { color: var(--text); text-decoration: none !important; }
.mini-info h3 a:hover { color: var(--primary); }
.mini-info p { font-size: 0.85rem; color: var(--text-light); }
.mini-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 4px; display: flex; gap: 12px; }

.mini-empty { text-align: center; padding: 32px; color: var(--text-light); font-size: 0.9rem; }

/* ───── 分类标签 ───── */
.card-category, .cat-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color, #6b7280) 12%, white);
    color: var(--cat-color, #6b7280);
}

/* ───── 分类列表页标题 ───── */
.category-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--cat-color, var(--primary));
}

.category-header h1 { font-size: 1.8rem; margin-bottom: 4px; }
.category-header p { color: var(--text-light); font-size: 0.95rem; }

/* ───── 面包屑导航 ───── */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-light); text-decoration: none !important; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 4px; }
.breadcrumb .current { color: var(--text); }

/* ───── 管理后台筛选 ───── */
.admin-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #f3f4f6;
    color: var(--text-light) !important;
    text-decoration: none !important;
    transition: all 0.2s;
}
.filter-tag:hover { background: #e5e7eb; }
.filter-active {
    background: var(--filter-color, var(--primary)) !important;
    color: white !important;
}

/* ───── 关于页板块介绍 ───── */
.about-section-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.about-section-item:last-child { border-bottom: none; }
.about-section-item h3 { font-size: 1rem; margin-bottom: 4px; }
.about-section-item p { font-size: 0.9rem; }

/* ───── 表单下拉框 ───── */
.form-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border 0.2s;
}
.form-select:focus { border-color: var(--primary); }

/* ───── 数据板块卡片 ───── */
.portal-data { border-top-color: #7c3aed; }

/* ───── 数据筛选栏 ───── */
.data-filters {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.filter-form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-light); }

.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    background: white;
}
.filter-input:focus { border-color: var(--primary); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ───── 数据表格 ───── */
.match-table-wrapper {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

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

.match-table th {
    background: #f9fafb;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.match-table td {
    padding: 14px 16px;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.match-table tbody tr:hover { background: #f9fafb; }

.match-scheduled { opacity: 0.8; }
.match-finished { }
.match-live { background: #fef2f2; }

.match-time { font-size: 0.85rem; color: var(--text-light); white-space: nowrap; }
.match-league { font-size: 0.82rem; color: var(--text-light); max-width: 120px; }
.match-team { font-weight: 600; white-space: nowrap; }
.match-winner { color: var(--primary); font-weight: 700; }
.winner-star { font-size: 0.75rem; margin-left: 2px; }

.match-score { text-align: center; width: 80px; }
.score-text {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 4px 14px;
    background: #1a1a2e;
    color: white;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}
.score-pending { background: #e5e7eb; color: #6b7280; font-size: 0.9rem; }

.match-status { text-align: center; }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-finished { background: #d4edda; color: #155724; }
.status-live { background: #fee2e2; color: #991b1b; animation: pulse 2s infinite; }
.status-scheduled { background: #dbeafe; color: #1e40af; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.btn-view {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white !important;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none !important;
}
.btn-view:hover { background: var(--primary-dark); }

/* ───── 比赛详情页 ───── */
.match-overview {
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    color: white;
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.match-league-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 24px;
}

.match-scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.scoreboard-team {
    flex: 1;
    max-width: 200px;
}
.scoreboard-team .team-name {
    font-size: 1.3rem;
    font-weight: 700;
}
.scoreboard-team.winner .team-name { color: #4ade80; }

.scoreboard-center { text-align: center; min-width: 120px; }

.scoreboard-score {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.score-vs { font-size: 2rem; opacity: 0.6; }
.scoreboard-time { font-size: 0.85rem; opacity: 0.7; margin-bottom: 8px; }
.scoreboard-status { margin-top: 8px; }

/* 技术统计 */
.match-stats-section, .match-odds-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

/* ───── 比赛详情：两队历史数据对比 ───── */
.history-compare {
    padding: 0 4px;
}

.history-compare-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.history-team-label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    background: #f9fafb;
}

.history-team-label.history-better {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.history-team-name {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
}

.history-team-league {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.history-vs {
    font-size: 1.3rem;
    font-weight: 800;
    color: #7c3aed;
}

.history-stat-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 6px 0;
}

.history-stat-val {
    width: 56px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    flex-shrink: 0;
}

.history-stat-val.val-better {
    color: #16a34a;
}

.history-stat-bar-area {
    flex: 1;
}

.history-stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 5px;
}

.history-stat-label small {
    font-weight: 400;
    font-size: 0.72rem;
}

.history-bar-group {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: #e5e7eb;
}

.history-bar {
    min-width: 4px;
    transition: width 0.3s;
}

.history-bar-left {
    background: #4ade80;
    border-radius: 5px 0 0 5px;
}

.history-bar-right {
    background: #60a5fa;
    border-radius: 0 5px 5px 0;
}

.bar-conceded.history-bar-left { background: #f87171; }
.bar-conceded.history-bar-right { background: #fb923c; }
.bar-possession.history-bar-left { background: #4ade80; }
.bar-possession.history-bar-right { background: #60a5fa; }

.h-w { color: #16a34a; font-weight: 700; }
.h-d { color: #d97706; }
.h-l { color: #dc2626; }
.h-sep { color: #d1d5db; margin: 0 1px; }

.history-summary {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 2px dashed var(--border);
    text-align: center;
}

.summary-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.summary-advantage {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #86efac;
}

.summary-even {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fde68a;
}

/* 只有一队数据时 */
.history-single {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.history-team-block {
    flex: 1;
    min-width: 200px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px 20px;
}

.history-team-block .history-team-name {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.history-team-block .history-team-league {
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.history-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.history-mini-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
}

.mini-label {
    color: var(--text-light);
}

.mini-val {
    font-weight: 700;
}

.history-missing {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    border-radius: 10px;
    padding: 16px;
    color: #92400e;
    font-size: 0.9rem;
}

/* ───── 数据导航首页 ───── */
.data-internal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.internal-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, box-shadow 0.15s;
    border-left: 4px solid #7c3aed;
}

.internal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    text-decoration: none;
}

.internal-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.internal-info {
    flex: 1;
}

.internal-info h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.internal-info p {
    font-size: 0.8rem;
    color: var(--text-light);
}

.internal-arrow {
    color: #7c3aed;
    font-size: 1.2rem;
    font-weight: 700;
}

/* 外部链接分类 */
.link-section {
    margin-bottom: 28px;
}

.link-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.link-section-subtitle {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 14px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.link-card {
    display: block;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: #7c3aed;
    text-decoration: none;
}

.link-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.link-name {
    font-size: 1rem;
    font-weight: 700;
}

.link-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 600;
}

.link-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.5;
}

.link-url {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: monospace;
}

.link-card-internal {
    border-left: 4px solid #7c3aed;
    background: linear-gradient(135deg, #faf5ff, #ffffff);
}

.link-card-internal:hover {
    border-color: #7c3aed;
    background: linear-gradient(135deg, #f3e8ff, #ffffff);
}

.data-disclaimer {
    margin-top: 32px;
    padding: 14px 20px;
    background: #f0f9ff;
    border-radius: 10px;
    border: 1px solid #bae6fd;
}

.data-disclaimer p {
    font-size: 0.85rem;
    color: #0369a1;
}

.match-stats-section h2, .match-odds-section h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.stats-table { display: flex; flex-direction: column; gap: 12px; }

.stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-label {
    width: 80px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    flex-shrink: 0;
}

.stat-bar-container { flex: 1; }

.stat-bars {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    position: relative;
}

.stat-bar {
    height: 8px;
    border-radius: 4px;
    transition: width 0.3s;
}
.stat-bar-home { background: var(--primary); }
.stat-bar-away { background: #7c3aed; }

.stat-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 60px;
    padding: 0 4px;
}
.stat-val-home { color: var(--primary-dark); }
.stat-val-away { color: #5b21b6; }

.odds-table { display: flex; flex-wrap: wrap; gap: 16px; }
.odds-row {
    background: #f9fafb;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.odds-label { font-size: 0.85rem; color: var(--text-light); }
.odds-value { font-size: 0.95rem; font-weight: 700; color: var(--text); }

/* ───── 数据板块导航标签 ───── */
.data-nav-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.data-nav-tab {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}
.data-nav-tab:hover {
    color: var(--text);
    text-decoration: none;
    background: #f3f4f6;
}
.data-nav-tab.active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
    background: #f5f3ff;
}

/* ───── 球队统计表格 ───── */
.team-stats-table th {
    font-size: 0.8rem;
    padding: 10px 8px;
    white-space: nowrap;
}
.team-stats-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
}

.rank-cell {
    width: 30px;
    text-align: center;
    color: var(--text-light);
    font-weight: 600;
}

.team-name-cell {
    font-weight: 600;
    white-space: nowrap;
}
.team-flag {
    margin-right: 4px;
}

.stat-number {
    text-align: center;
}

.stat-value-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
}
.stat-bar-inline {
    height: 6px;
    border-radius: 3px;
    background: #4ade80;
    flex-shrink: 0;
    min-width: 4px;
}
.bar-defence { background: #f87171; }
.bar-possession { background: #60a5fa; }
.stat-bar-text {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.stat-wdl {
    text-align: center;
    font-size: 0.85rem;
}
.wdl-w { color: #16a34a; font-weight: 700; }
.wdl-d { color: #d97706; }
.wdl-l { color: #dc2626; }

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.team-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ───── 球队对比 ───── */
.compare-selector {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.compare-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.compare-team-select {
    flex: 1;
    min-width: 200px;
}
.compare-team-select label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
}
.compare-team-select select {
    width: 100%;
}
.compare-vs {
    font-size: 1.5rem;
    font-weight: 800;
    color: #7c3aed;
    padding-bottom: 8px;
}
.compare-btn {
    padding-bottom: 4px;
}

.compare-result {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.compare-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}
.compare-team-card {
    flex: 1;
    text-align: center;
    padding: 16px;
    border-radius: var(--radius);
    background: #f9fafb;
}
.compare-team-card.compare-winner {
    background: #f0fdf4;
    border: 2px solid #4ade80;
}
.compare-team-flag {
    font-size: 2rem;
    margin-bottom: 8px;
}
.compare-team-card h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.compare-team-league {
    font-size: 0.85rem;
    color: var(--text-light);
}
.compare-center {
    text-align: center;
    min-width: 80px;
}
.compare-vs-big {
    font-size: 2rem;
    font-weight: 900;
    color: #7c3aed;
}
.compare-season {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

.compare-stats h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.compare-stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 8px 0;
}
.compare-stat-val {
    width: 60px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.compare-stat-val.stat-better {
    color: #16a34a;
}
.compare-stat-bar-area {
    flex: 1;
}
.compare-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 6px;
}
.compare-stat-label small {
    font-weight: 400;
    font-size: 0.75rem;
}
.compare-bar-group {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: #e5e7eb;
}
.compare-bar-left {
    background: #4ade80;
    border-radius: 5px 0 0 5px;
    min-width: 4px;
    transition: width 0.3s;
}
.compare-bar-right {
    background: #60a5fa;
    border-radius: 0 5px 5px 0;
    min-width: 4px;
    transition: width 0.3s;
}
.bar-conceded.compare-bar-left { background: #f87171; }
.bar-conceded.compare-bar-right { background: #fb923c; }
.bar-possession.compare-bar-left { background: #4ade80; }
.bar-possession.compare-bar-right { background: #60a5fa; }

.compare-summary {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}
.compare-summary h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #f9fafb;
    border-radius: 8px;
}
.summary-label {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
}
.summary-winner {
    font-weight: 700;
    color: #16a34a;
}
.summary-draw {
    font-weight: 600;
    color: #d97706;
}

.compare-hint {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.compare-hint .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}
.compare-hint h3 {
    margin-bottom: 8px;
}
.compare-hint p {
    color: var(--text-light);
}

/* ───── 响应式 ───── */
@media (max-width: 768px) {
    .portal-grid { grid-template-columns: 1fr; }
    .category-header { padding: 24px; }
    .category-header h1 { font-size: 1.4rem; }

    .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--primary); padding: 16px; }
    .nav-links.active { display: flex; }
    .nav-links a { margin: 8px 0; padding: 8px 0; }
    .nav-toggle { display: block; }

    .hero { padding: 32px 20px; }
    .hero h1 { font-size: 1.8rem; }

    .article-grid { grid-template-columns: 1fr; }

    .article-detail { padding: 24px; }
    .article-title { font-size: 1.5rem; }

    .dashboard-header { flex-direction: column; align-items: flex-start; }

    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 8px; }

    .data-nav-tabs { flex-wrap: wrap; }
    .data-nav-tab { padding: 10px 12px; font-size: 0.85rem; }

    .compare-form { flex-direction: column; align-items: stretch; }
    .compare-team-select { min-width: 100%; }
    .compare-vs { text-align: center; }
    .compare-header { flex-direction: column; gap: 12px; }
    .compare-center { order: -1; }

    .stat-value-bar { min-width: 100px; }

    .data-internal { grid-template-columns: 1fr; }
    .link-grid { grid-template-columns: 1fr; }
}
