body {
    background: linear-gradient(180deg, #1A7BE3 0%, #E6F0FA 100%);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-size: calc(16px + 0.5vw);
}
/* 守望先锋图标 */
body::before {
    content: '';
    position: absolute;
    top: 120px;
    right: 20px;
    width: 200px;
    height: 200px;
    background: url('/static/images/112602-4uo1q7gs0b.png') no-repeat center;
    background-size: contain;
    opacity: 0.5;
    z-index: 0;
}
.container {
    max-width: 800px;
    position: relative;
    z-index: 1;
}
.content-box {
    background-color: rgba(77, 78, 83, 0.85);
    border: 2px solid #218FFE;
}
.input-box {
    background-color: #4D4E53;
    border: 1px solid #218FFE;
}
.input-box:focus {
    border-color: #FC9D1F;
    box-shadow: 0 0 5px rgba(252, 157, 31, 0.5);
}
.btn-overwatch {
    background-color: #FC9D1F;
    border-color: #FC9D1F;
}
.btn-overwatch:hover {
    background-color: #e08e1a;
    border-color: #e08e1a;
}
.game-info-box {
    background-color: rgba(255, 255, 255, 0.85);
    border: 2px solid #218FFE;
    padding: 10px;
}
.game-info-box h3 {
    color: #FC9D1F;
    border-bottom: 1px solid #218FFE;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.player-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.avatar {
    width: 100px;
    height: 100px;
    border: 2px solid #FC9D1F;
    border-radius: 50%;
}
.player-details {
    flex: 1;
    color: #000000;
}
.player-details h3 {
    color: #FC9D1F;
    margin-bottom: 10px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 5px;
}
.info-row p {
    margin: 0;
    font-size: 0.9rem;
}
.season-info {
    margin-top: 20px;
}
.season-info h3 {
    color: #000000;
}
.season-info .tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.season-info .tab-button {
    padding: 8px 18px;
    background-color: #4D4E53;
    border: 1px solid #218FFE;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    color: #ffffff;
}
.season-info .tab-button:hover,
.season-info .tab-button.active {
    background-color: #FC9D1F;
    color: #ffffff;
}
.sub-section {
    margin-bottom: 15px;
}
.sub-section h5 {
    color: #000000;
    margin-bottom: 5px;
    font-size: 1rem;
}
.rank-icon {
    width: 24px;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
}
.rank-icon.no-rank {
    width: 32px;
}
/* 职责图标样式 */
.role-icon {
    width: 20px;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
}
/* 英雄图标样式 */
.hero-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    object-fit: contain;
}
/* 表格样式 */
.role-table {
    background-color: rgba(77, 78, 83, 0.9);
    color: #ffffff;
}
.role-table th {
    background-color: #ffffff;
    color: #000000;
    text-align: center;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid #218FFE;
}
.role-table td {
    text-align: center;
    vertical-align: middle;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid #218FFE;
}
/* 确保段位图标和数字对齐 */
.rank-container {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #000000;
}
/* 确保职责图标和文本对齐 */
.role-container {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
/* 比赛结果样式 */
.match-result-win {
    color: #28a745; /* 绿色表示胜利 */
}
.match-result-loss {
    color: #dc3545; /* 红色表示失败 */
}
.match-result-draw {
    color: gray;
}
/* 赛季选择样式 */
.season-select {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.season-select label {
    color: #FC9D1F;
    font-size: 1rem;
}
.season-select select {
    background-color: #4D4E53;
    border: 1px solid #218FFE;
    color: #ffffff;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}
.season-select select:focus {
    border-color: #FC9D1F;
    box-shadow: 0 0 5px rgba(252, 157, 31, 0.5);
    outline: none;
}
/* 卡片布局样式 */
.stats-cards, .recent-match-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 始终 4 列 */
    gap: 10px;
    margin-top: 20px;
}
.stats-card {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid #218FFE;
    padding: 10px;
    text-align: center;
    border-radius: 4px;
}
.stats-card h6 {
    color: #000000;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.stats-card p {
    color: #000000;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}
/* 最近12场胜负样式 */
.recent-match-section {
    margin-top: 20px;
    margin-bottom: 20px; /* 与下面的对局列表隔开 */
}
/* 对局列表样式 */
.match-list-section {
    margin-top: 20px; /* 与前面的内容隔开 */
}
.match-list-header {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    color: #000000;
    padding: 10px;
    border: 1px solid #218FFE;
    font-size: 0.8rem;
    font-weight: bold;
}
.match-list-header div {
    text-align: center;
}
.match-list-header .result-header {
    width: 15%;
}
.match-list-header .hero-header {
    width: 10%;
}
.match-list-header .kad-header {
    width: 50%;
}
.match-list-header .kad-header div {
    margin-bottom: 5px;
}
.match-list-header .rank-header {
    width: 25%;
}
.match-list-item {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(77, 78, 83, 0.9);
    border: 1px solid #218FFE;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.match-list-item:hover {
    background-color: rgba(77, 78, 83, 1);
}
.game-mode {
    position: absolute;
    top: 5px; /* 距顶部5px */
    right: 5px; /* 距右侧5px */
    padding: 2px 8px;
    background-color: rgba(0, 0, 0, 0.7); /* 半透明黑色背景 */
    color: #ffffff; /* 白色文字 */
    font-size: 0.8rem; /* 稍小的字体 */
    border-radius: 3px; /* 圆角 */
    z-index: 1; /* 确保在渐变和图片之上 */
}
.match-list-item-content,
.rank {
    position: relative;
    z-index: 1;
}
.match-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}
.match-list-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
    z-index: -1;
}
.match-list-item-content {
    display: flex;
    flex-direction: column;
    width: 75%; /* 留出 25% 给 rank 列 */
}
.match-list-item-content .row {
    display: flex;
    align-items: center;
}
.match-list-item-content .row.first-row {
    margin-bottom: 5px;
}
.match-list-item-content .row.second-row {
    font-size: 0.8rem;
    color: #cccccc;
}
.match-list-item-content .result {
    width: 23%;
    text-align: center;
}
.match-list-item-content .hero {
    width: 10%;
    text-align: center;
    padding: 0 0;
}
.match-list-item-content .kad {
    width: 65%;
    text-align: center;
    color: #000000;
}
.match-list-item .rank {
    width: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
/* 响应式调整 */
@media (max-width: 768px) {
    body {
        font-size: calc(14px + 0.3vw);
    }
    .game-info-box h3 {
        font-size: 1.3rem;
    }
    .player-info  .avatar {
        width: 80px;
        height: 80px;
    }
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    .player-details p {
        font-size: 0.8rem;
    }
    .season-info .tab-button {
        font-size: 1rem;
    }
    .sub-section h5 {
        font-size: 0.9rem;
    }
    .role-table th, .role-table td {
        font-size: 0.7rem;
        padding-left: 1px;
    }
    .container {
        max-width: 100%;
        padding: 5px;
    }
    .role-icon {
        width: 24px;
        height: auto;
    }

    .hero-icon {
        width: 24px;
        height: auto;

    }
    .match-list-header, .match-list-item-content .row.second-row {
        font-size: 0.7rem;
    }
    /* 调整卡片字体大小以适应小屏幕 */
    .stats-card h6 {
        font-size: 0.8rem;
    }
    .stats-card p {
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    body {
        font-size: calc(12px + 0.2vw);
    }
    .game-info-box h2 {
        font-size: 1.2rem;
    }
    .player-info {
        flex-direction: column;
        align-items: flex-start;
    }
    .player-info img {
        width: 60px;
        height: 60px;
    }
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    .player-details p {
        font-size: 0.7rem;
    }
    .season-info .tab-button {
        padding: 3px 10px;
        font-size: 1rem;
    }
    .sub-section h5 {
        font-size: 0.8rem;
    }
    .role-table th, .role-table td {
        font-size: 0.75rem;
    }
    .rank-icon {
        width: 20px;
    }
    .rank-icon.no-rank {
        width: 28px;
    }
    .role-icon, .hero-icon {
        width: 16px;
    }
    .game-info-box {
        padding: 5px;
    }
    .match-list-header, .match-list-item-content .row.second-row {
        font-size: 0.65rem;
    }
    /* 调整卡片字体大小以适应更小屏幕 */
    .stats-card h6 {
        font-size: 0.7rem;
    }
    .stats-card p {
        font-size: 0.8rem;
    }
}
.more-matches-link {
    font-size: 14px;
    color: #007bff;
    text-decoration: none;
    vertical-align: middle;
}
.more-matches-link:hover {
    text-decoration: underline;
    color: #0056b3;
}