* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'LiSu', '隶书', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部按钮区域 */
.header-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.header-buttons button {
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
    padding: 8px 18px;
    text-align: center;
}

/* 斗地主按钮 */
.doudizhu-btn {
    background-color: #8b0000;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.doudizhu-btn:hover {
    background-color: #660000;
}

/* 排行榜按钮 */
.rank-btn {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.rank-btn:hover {
    background-color: #e07c00;
}

.shop-btn, .doudizhu-btn, .rank-btn, .export-all-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* 导出全部数据按钮 */
.export-all-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

.export-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(33, 150, 243, 0.4);
}

.export-all-btn:active {
    transform: translateY(0);
}

/* 武将商城按钮样式 */
.shop-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
}

.shop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.4);
}

.shop-btn:active {
    transform: translateY(0);
}

/* ========== 筛选区域样式 ========== */
.filter-bar {
    background: #f0ebe0;
    border-radius: 12px;
    margin: 0 20px 15px 20px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0d5c0;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
    justify-content: flex-start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 100px;
}

.filter-group label {
    font-size: 12px;
    font-weight: bold;
    color: #8b0000;
    letter-spacing: 1px;
}

.filter-select, .filter-input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-select:hover, .filter-input:hover {
    border-color: #c0a070;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 5px rgba(139, 0, 0, 0.3);
}

.search-group {
    min-width: 150px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 5px;
}

.filter-apply-btn, .filter-reset-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.filter-apply-btn {
    background: linear-gradient(135deg, #8b0000, #660000);
    color: white;
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.3);
}

.filter-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.4);
}

.filter-reset-btn {
    background: #e0d5c0;
    color: #5a3e1b;
    border: 1px solid #c0a070;
}

.filter-reset-btn:hover {
    background: #d4c4a8;
    transform: translateY(-1px);
}

/* 空结果提示样式 */
.empty-result {
    text-align: center;
    padding: 80px 20px;
    background: #fafaf5;
    border-radius: 20px;
    margin: 30px 0;
}

.empty-result-content {
    display: inline-block;
}

.empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
}

.empty-result p {
    font-size: 18px;
    color: #8b0000;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 14px;
    color: #999 !important;
}

/* 标签页区域 */
.tabs {
    display: flex;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.tab:hover {
    background-color: #d0d0d0;
}

.tab.active {
    background-color: #8b0000;
    color: white;
    font-weight: bold;
}

/* 扩展包标题 */
.expansion-title {
    text-align: center;
    font-size: 24px;
    margin: 20px 0;
    color: #8b0000;
    font-weight: bold;
}

/* 武将网格 */
.heroes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

/* 武将卡片 */
.hero-card {
    width: calc(10% - 14px);
    aspect-ratio: 3/4;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 武将图片区域 */
.hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* 国家图标 */
.nation-icon {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 33px;
    height: 33px;
    z-index: 2;
}

/* 血量容器 */
.health-container {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(calc(-50% + 15px));
    display: flex;
    z-index: 2;
    gap: 0px;
    flex-wrap: nowrap;
}

/* 血量文字 */
.health-text {
    color: #C0C0C0;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 1px black;
}

/* 血量勾玉 */
.health-gem {
    width: 15px;
    height: 15px;
    margin-right: -2px;
}

/* 武将名（竖排） */
.hero-name {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-40%);
    writing-mode: vertical-lr;
    color: white;
    text-shadow: 1px 1px 2px black;
    font-weight: bold;
    letter-spacing: 0px;
    font-size: 16px;
    z-index: 2;
}

/* 品质图标 */
.rarity-icon {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 33px;
    height: 33px;
    z-index: 2;
}

/* 响应式设计 - 大屏幕 */
@media (max-width: 1200px) {
    .hero-card {
        width: calc(16.666% - 13px); /* 6列 */
    }
}

/* 响应式设计 - 中等屏幕 */
@media (max-width: 992px) {
    .hero-card {
        width: calc(20% - 12px); /* 5列 */
    }
}

/* 响应式设计 - 平板 */
@media (max-width: 768px) {
    .header-buttons {
        justify-content: center;
    }
    
    .doudizhu-btn, .rank-btn, .export-all-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .hero-card {
        width: calc(25% - 12px); /* 4列 */
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 0 0 calc(33.333% - 0px);
        padding: 8px 5px;
        font-size: 14px;
    }
    
    /* 筛选区域响应式 */
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        justify-content: center;
        margin-top: 5px;
    }
    
    .filter-bar {
        margin: 0 10px 15px 10px;
    }
}

/* 响应式设计 - 手机 */
@media (max-width: 480px) {
    .header-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .doudizhu-btn, .rank-btn, .export-all-btn {
        margin: 0;
        margin-bottom: 5px;
        width: 100%;
    }
    
    .hero-card {
        width: calc(50% - 8px); /* 2列 */
    }
    
    .tab {
        flex: 0 0 50%;
        padding: 8px 3px;
        font-size: 13px;
    }
    
    .expansion-title {
        font-size: 20px;
    }
    
    /* 筛选区域手机响应式 */
    .filter-bar {
        margin: 0 10px 15px 10px;
        padding: 10px 15px;
    }
    
    .filter-select, .filter-input {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .filter-apply-btn, .filter-reset-btn {
        padding: 6px 16px;
        font-size: 13px;
    }
}

/* 小手机 */
@media (max-width: 360px) {
    .tab {
        flex: 0 0 100%;
    }
}