/* 前端基础样式 - Beautified by Trae */
.abv2fi-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.5;
}

/* 布局：两栏结构 */
.abv2fi-two-cols {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.abv2fi-left {
    flex: 1;
    min-width: 0;
    /* 防止子元素溢出 */
}

.abv2fi-right {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .abv2fi-two-cols {
        flex-direction: column-reverse;
    }

    .abv2fi-right {
        width: 100%;
        margin-bottom: 20px;
        box-sizing: border-box;
    }
}

/* 标题样式 */
.abv2fi-container h2,
.abv2fi-container h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1f2937;
    font-weight: 600;
}

.abv2fi-container section {
    margin-bottom: 40px;
}

/* 右侧侧边栏列表 */
.abv2fi-right h3 {
    font-size: 1.1em;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 10px;
}

.abv2fi-right ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.abv2fi-right li {
    margin: 0;
}

.abv2fi-right li a {
    display: block;
    padding: 8px 12px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95em;
}

.abv2fi-right li a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

.abv2fi-right li.active a {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

/* 网格与卡片 */
.abv2fi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.abv2fi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.abv2fi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #bfdbfe;
}

.abv2fi-card a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    display: block;
    font-size: 0.95em;
}

/* 表格样式 (CSS Grid 实现) */
.abv2fi-table {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    /* 保持圆角 */
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 0.95em;
}

.abv2fi-table-row {
    display: grid;
    /* 默认布局：排名 | 球队 | 积分 */
    grid-template-columns: 60px 1fr 80px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.abv2fi-table-row:last-child {
    border-bottom: none;
}

.abv2fi-table-head {
    background-color: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.05em;
}

/* 特殊列样式 */
.abv2fi-table-row span:nth-child(1) {
    /* 排名 */
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

.abv2fi-table-row span:nth-child(2) {
    /* 球队 */
    font-weight: 500;
    padding: 0 10px;
}

.abv2fi-table-row span:nth-child(3) {
    /* 积分 */
    font-weight: 700;
    color: #111827;
    text-align: center;
}

/* 针对伤病列表的 5 列布局重写 */
.abv2fi-table-row:has(span:nth-child(5)) {
    grid-template-columns: 1fr 0.8fr 100px 100px 1.5fr;
}

/* 针对球队球员列表的 3 列布局 */
.abv2fi-table-row:has(span:nth-child(3)):not(:has(span:nth-child(4))) {
    grid-template-columns: 60px 1fr 1fr;
}

/* 赛程列表 */
.abv2fi-fixture-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.abv2fi-fixture-list li {
    padding: 0;
    border-bottom: 1px solid #f3f4f6;
}

.abv2fi-fixture-list li:last-child {
    border-bottom: none;
}

.abv2fi-fixture-list a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151;
    transition: background-color 0.2s;
    font-size: 0.95em;
}

.abv2fi-fixture-list a:hover {
    background-color: #f9fafb;
    color: #2563eb;
}

/* 表格行悬停效果 */
.abv2fi-table-row:hover {
    background: #f8fafc;
}

/* 表单样式 */
.abv2fi-inline-form {
    background: #f3f4f6;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #e5e7eb;
}

.abv2fi-inline-form label {
    font-weight: 500;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 8px;
}

.abv2fi-inline-form select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    min-width: 120px;
}

.abv2fi-inline-form button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.abv2fi-inline-form button:hover {
    background-color: #1d4ed8;
}

/* 错误提示 */
.abv2fi-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 20px;
}

/* 赛前报告 */
.abv2fi-report {
    border: 1px solid #bfdbfe;
    padding: 24px;
    border-radius: 8px;
    background: #eff6ff;
    margin-top: 24px;
}

.abv2fi-report-title {
    color: #1e40af;
    font-size: 1.25em;
    font-weight: 700;
    border-bottom: 1px solid #dbeafe;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.abv2fi-report-content {
    line-height: 1.7;
    color: #1e3a8a;
}

/* 比赛状态与生成报告按钮 */
.abv2fi-status {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #374151;
    margin: 16px 0;
}

.abv2fi-status-live {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0c4a6e;
}

.abv2fi-status-ns {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #7c2d12;
}

.abv2fi-prematch-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 20px;
}

.abv2fi-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.abv2fi-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.abv2fi-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #c7d2fe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: abv2fi-spin 0.8s linear infinite;
}

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

/* 技术统计可视化 */
.abv2fi-stats-block {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.abv2fi-stat-item {
    margin: 14px 0;
}

.abv2fi-stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
}

.abv2fi-stat-head .label {
    font-weight: 600;
    color: #0f172a;
    flex: 1;
    text-align: center;
}

.abv2fi-stat-line {
    position: relative;
    height: 10px;
    background: #eef2f7;
    border-radius: 6px;
    overflow: hidden;
}

.abv2fi-bar-home {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #1d4ed8;
    border-radius: 6px;
}

.abv2fi-bar-away {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: #22c55e;
    border-radius: 6px;
}

.abv2fi-stat-values {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 12px;
    margin-top: 6px;
}

/* 简易柱状图 */
.abv2fi-chart {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.abv2fi-chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.abv2fi-chart-label {
    width: 90px;
    color: #334155;
    font-size: 13px;
}

.abv2fi-chart-track {
    flex: 1;
    height: 12px;
    background: #eef2f7;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.abv2fi-chart-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 8px;
}

.abv2fi-chart-bar--for {
    background: #10b981;
}

.abv2fi-chart-bar--against {
    background: #ef4444;
}

.abv2fi-chart-bar--yellow {
    background: #f59e0b;
}

.abv2fi-chart-value {
    width: 56px;
    text-align: right;
    color: #64748b;
    font-size: 12px;
}

.abv2fi-grid {
    display: grid;
    gap: 16px;
}

.abv2fi-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width:768px) {
    .abv2fi-grid-2 {
        grid-template-columns: 1fr;
    }
}

.abv2fi-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.abv2fi-card-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
    margin-bottom: 10px;
}

.abv2fi-kpi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.abv2fi-kpi-title {
    color: #334155;
    font-size: 13px;
}

.abv2fi-kpi-value {
    color: #0f172a;
    font-weight: 700;
    font-size: 16px;
}

.abv2fi-subgrid-2 {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width:768px) {
    .abv2fi-subgrid-2 {
        grid-template-columns: 1fr;
    }
}

.abv2fi-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
}

.abv2fi-badge--home {
    background: #1d4ed8;
    color: #fff;
}

.abv2fi-badge--away {
    background: #22c55e;
    color: #fff;
}

.abv2fi-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.abv2fi-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}