body {
    margin: 0;
    font-family: "Microsoft YaHei UI", Arial, sans-serif;
    background: #f4f6f8;
    color: #1b1f23;
}

a {
    color: #0b63ce;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.brand {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.nav a {
    margin-left: 16px;
}

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

.grid.two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.panel {
    background: #fff;
    border: 1px solid #d9e0e7;
    border-radius: 8px;
    padding: 16px;
}

.panel h2,
.panel h3 {
    margin-top: 0;
}

.form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

input[type="text"],
select,
textarea {
    flex: 1 1 220px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #c7d1db;
    border-radius: 6px;
    box-sizing: border-box;
    font: inherit;
}

textarea {
    min-height: 120px;
}

button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #0b63ce;
    background: #0b63ce;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
}

.button-danger {
    border-color: #d14343;
    background: #d14343;
}

th .sort-button {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 0;
    font-weight: 700;
}

th .sort-button:hover {
    text-decoration: underline;
}

.pill {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid #c7d1db;
    border-radius: 999px;
    background: #fff;
    color: #0b63ce;
}

.pill.active {
    background: #0b63ce;
    color: #fff;
    border-color: #0b63ce;
}

.detail-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat {
    background: #f8fafc;
    border: 1px solid #dce4ec;
    border-radius: 6px;
    padding: 10px;
}

.label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.value {
    font-size: 15px;
    font-weight: 600;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

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

th,
td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5ebf1;
    vertical-align: top;
}

th {
    background: #f8fafc;
    font-weight: 700;
}

.muted {
    color: #6b7280;
}

.event-card {
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
}

.match-card {
    border: 1px solid #dbe3eb;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    background: #fff;
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.alliances {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.alliances.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.alliance {
    border-radius: 8px;
    padding: 12px;
}

.alliance.red {
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.alliance.blue {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.team-line {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 4px;
    font-size: 13px;
}

.search-list {
    margin: 0;
    padding-left: 18px;
}

.empty {
    padding: 18px 0;
    color: #6b7280;
}

@media (max-width: 860px) {
    .alliances.two-column {
        grid-template-columns: 1fr;
    }
}
