/* ========================================
   农场游戏 - 极简主义设计
   设计理念：简洁、清爽、实用
======================================== */

/* ========== 全局设置 ========== */
* {
    box-sizing: border-box;
}

.farmer-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    font-size: 24px;
    color: #333;
}

/* ========== 消息和公告容器 ========== */
.message-announcement-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.message-announcement-container > div {
    flex: 1;
}

@media (max-width: 768px) {
    .message-announcement-container {
        flex-direction: column;
    }
}

/* ========== 实时消息通知栏 ========== */
.message-notification-bar,
.announcement-bar {
    background: #fff;
    border: 1px solid #ddd;
}

.message-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.message-header i {
    font-size: 14px;
    color: #666;
}

.message-header small {
    margin-left: auto;
    font-size: 11px;
    color: #999;
    font-weight: normal;
}

.message-list {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
}

.message-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background: #fafafa;
}

.message-item i {
    font-size: 13px;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
    font-family: monospace;
}

.message-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* 滚动条美化 */
.message-list::-webkit-scrollbar {
    width: 4px;
}

.message-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.message-list::-webkit-scrollbar-thumb {
    background: #ddd;
}

.message-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* ========== 公告专用样式 ========== */
.announcement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-item:hover {
    background: #fafafa;
}

.announcement-item i {
    font-size: 12px;
    flex-shrink: 0;
}

.announcement-text {
    flex: 1;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.announcement-text strong {
    color: #333;
    font-weight: 600;
}

.announcement-time {
    font-size: 11px;
    color: #999;
    flex-shrink: 0;
    font-family: monospace;
}

/* ========== 第一行：系统统计模块 ========== */
.stats-module {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    transition: background 0.2s;
}

.module-card:hover {
    background: #f0f0f0;
}

.module-card .card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    font-size: 18px;
}

.module-card .card-content {
    flex: 1;
}

.module-card .card-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.module-card .card-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* ========== 第二行：个人操作模块 ========== */
.action-module {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #ddd;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    border: 1px solid #333;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}

.action-btn:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.action-btn i {
    font-size: 14px;
}

.action-btn-primary {
    background: #333;
    color: #fff;
}

.action-btn-primary:hover {
    background: #000;
    color: #fff;
}

.action-btn-info,
.action-btn-success,
.action-btn-warning,
.action-btn-danger,
.action-btn-default {
    background: #fff;
    color: #333;
    border-color: #ddd;
}

.action-btn-info:hover,
.action-btn-success:hover,
.action-btn-warning:hover,
.action-btn-danger:hover,
.action-btn-default:hover {
    background: #f0f0f0;
    border-color: #333;
    color: #333;
}

/* ========== 农民列表区域 ========== */
.farmer-list-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
}

/* ========== 操作按钮 ========== */
.action-buttons {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #333;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn:hover {
    background: #333;
    color: #fff;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: #333;
    color: #fff;
}

.btn-primary:hover {
    background: #000;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    white-space: nowrap;
}

/* ========== 表格容器 ========== */
.farmer-table-wrapper {
    overflow-x: visible;
    width: 100%;
}

/* ========== 农民列表（表格式） ========== */
.farmer-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    background: #fff;
}

.farmer-table th {
    background: #f8f8f8;
    padding: 15px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.farmer-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #555;
    vertical-align: middle;
}

.farmer-table tbody tr:hover {
    background: #f8f8f8;
}

.farmer-table tbody tr:last-child td {
    border-bottom: none;
}

/* 状态标签 */
.status-badge {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.status-working {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.status-full {
    background: #fff3e0;
    border-color: #ff9800;
    color: #f57c00;
}

.status-resting {
    background: #f5f5f5;
    border-color: #9e9e9e;
    color: #757575;
}

/* 进度条 */
.progress-bar {
    background: #e0e0e0;
    height: 24px;
    border: 1px solid #ccc;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.progress-fill {
    background: #4caf50;
    height: 100%;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    top: 0;
}

.progress-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.5),
        1px -1px 0 rgba(0,0,0,0.5),
        -1px 1px 0 rgba(0,0,0,0.5),
        1px 1px 0 rgba(0,0,0,0.5),
        0 0 3px rgba(0,0,0,0.8);
    z-index: 1;
}

.progress-success {
    background: #4caf50;
}

.progress-warning {
    background: #ff9800;
}

.progress-danger {
    background: #f44336;
}

/* 操作按钮组 */
.action-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f8f8;
    border: 1px solid #ddd;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #666;
    margin: 0 0 10px 0;
}

.empty-state p {
    font-size: 14px;
    color: #999;
    margin: 0 0 20px 0;
}

/* ========== 右侧边栏操作按钮 ========== */
.sidebar-action {
    margin-bottom: 20px;
}

.sidebar-action .btn-block {
    width: 100%;
    justify-content: center;
    font-size: 16px;
    padding: 12px 20px;
}

/* ========== 右侧边栏卡片 ========== */
.sidebar-card {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.sidebar-card-header {
    background: #f8f8f8;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card-header i {
    font-size: 14px;
}

.sidebar-card-body {
    padding: 15px;
}

/* 统计行 */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.stat-label {
    font-size: 13px;
    color: #666;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 侧边栏链接 */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: #f8f8f8;
    border-color: #333;
}

.sidebar-link i {
    font-size: 14px;
}

.sidebar-link:last-child {
    margin-bottom: 0;
}

/* 帮助列表 */
.help-list {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: disc;
}

.help-list li {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.help-list li:last-child {
    margin-bottom: 0;
}

/* 模态框样式 */
.config-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 10px;
}

.config-item h6 {
    margin: 0 0 10px 0;
    color: #333;
}

.config-item .small {
    font-size: 13px;
    color: #666;
}

.potion-options .btn {
    margin-bottom: 10px;
}

/* 背包容量显示 */
.bag-capacity {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #ddd;
    background: #f8f8f8;
}

.bag-capacity.bag-normal {
    color: #28a745;
    border-color: #28a745;
    background: #f0f9f3;
}

.bag-capacity.bag-warning {
    color: #ff9800;
    border-color: #ff9800;
    background: #fff8f0;
}

.bag-capacity.bag-full {
    color: #dc3545;
    border-color: #dc3545;
    background: #fdf0f0;
}

/* 背包物品内联显示 */
.bag-items-inline {
    font-size: 12px;
    line-height: 1.6;
    color: #666;
}

/* ========== 背包物品网格 ========== */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.inventory-card {
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.inventory-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.inventory-card-header {
    padding: 12px 15px;
    background: #f8f8f8;
    position: relative;
}

.item-rarity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding-right: 60px;
}

.inventory-card-body {
    padding: 15px;
}

.item-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.item-info-row:last-child {
    border-bottom: none;
}

.item-info-label {
    font-size: 13px;
    color: #666;
}

.item-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.inventory-card-footer {
    padding: 12px 15px;
    background: #f8f8f8;
    display: flex;
    gap: 8px;
    border-top: 1px solid #ddd;
}

.inventory-card-footer .btn {
    flex: 1;
    font-size: 13px;
}

.btn-outline {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    background: #f0f0f0;
    border-color: #333;
    color: #333;
}

/* 文本样式 */
.text-muted {
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .stats-module {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-module {
        justify-content: center;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-module {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 150px;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .farmer-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 手机端全面优化 (768px及以下) ========== */
@media (max-width: 768px) {
    /* 容器优化 */
    .farmer-container {
        padding: 10px;
    }
    
    /* 页面标题 */
    .page-title {
        font-size: 18px;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    /* 消息和公告 - 已经在上面定义为column */
    .message-announcement-container {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .message-header {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .message-list {
        max-height: 150px;
    }
    
    .message-item,
    .announcement-item {
        padding: 6px 12px;
        flex-wrap: wrap;
    }
    
    .message-text,
    .announcement-text {
        font-size: 11px;
        flex: 1 1 100%;
        margin-bottom: 3px;
    }
    
    .message-time,
    .announcement-time {
        font-size: 10px;
        margin-left: auto;
    }
    
    /* 统计模块 - 改为2列布局 */
    .stats-module {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .module-card {
        padding: 10px;
        gap: 8px;
    }
    
    .module-card .card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .module-card .card-label {
        font-size: 11px;
    }
    
    .module-card .card-value {
        font-size: 16px;
    }
    
    /* 操作按钮模块 */
    .action-module {
        padding: 10px;
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .action-btn {
        flex: 1 1 calc(50% - 3px);
        min-width: 0;
        justify-content: center;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .action-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 农民列表区域 */
    .farmer-list-section {
        padding: 0;
        border: none;
    }
    
    /* 表格容器 - 添加横向滚动 */
    .farmer-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    /* 表格优化 */
    .farmer-table {
        min-width: 800px;
        font-size: 11px;
        border-left: none;
        border-right: none;
    }
    
    .farmer-table th,
    .farmer-table td {
        padding: 10px 6px;
        white-space: nowrap;
    }
    
    .farmer-table th {
        font-size: 11px;
        position: sticky;
        top: 0;
        background: #f8f8f8;
        z-index: 10;
    }
    
    /* 状态标签 */
    .status-badge {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .status-badge i {
        font-size: 11px;
    }
    
    /* 进度条 */
    .progress-bar {
        min-width: 100px;
        height: 20px;
    }
    
    .progress-text {
        font-size: 10px;
    }
    
    /* 背包容量 */
    .bag-capacity {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    /* 背包物品内联显示 */
    .bag-items-inline {
        font-size: 11px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 操作按钮组 */
    .action-group {
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }
    
    .action-group .btn {
        font-size: 11px;
        padding: 5px 8px;
        white-space: nowrap;
    }
    
    .action-group .btn i {
        font-size: 11px;
    }
    
    /* 模态框优化 */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .config-item {
        padding: 12px;
    }
    
    .config-item h6 {
        font-size: 14px;
    }
    
    .config-item .small {
        font-size: 12px;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 40px 15px;
    }
    
    .empty-state i {
        font-size: 48px;
    }
    
    .empty-state h3 {
        font-size: 16px;
    }
    
    .empty-state p {
        font-size: 13px;
    }
}

/* ========== 超小屏幕优化 (480px及以下) ========== */
@media (max-width: 480px) {
    /* 统计模块 - 单列布局 */
    .stats-module {
        grid-template-columns: 1fr;
    }
    
    /* 操作按钮 - 单列布局 */
    .action-btn {
        flex: 1 1 100%;
    }
    
    /* 消息文字完全换行 */
    .message-text,
    .announcement-text {
        flex: 1 1 100%;
    }
    
    /* 表格更窄的优化 */
    .farmer-table {
        min-width: 700px;
    }
    
    /* 进度条 */
    .progress-bar {
        min-width: 80px;
    }
    
    /* 背包网格 - 2列布局 */
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .inventory-card {
        font-size: 12px;
    }
    
    .inventory-card-header {
        padding: 8px 10px;
    }
    
    .item-name {
        font-size: 13px;
        padding-right: 45px;
    }
    
    .item-rarity-badge {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .inventory-card-body {
        padding: 10px;
    }
    
    .item-info-row {
        padding: 5px 0;
    }
    
    .item-info-label {
        font-size: 11px;
    }
    
    .item-info-value {
        font-size: 12px;
    }
    
    .inventory-card-footer {
        padding: 8px 10px;
        gap: 5px;
    }
    
    .inventory-card-footer .btn {
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* ========== 超小屏幕背包优化 (360px及以下) ========== */
@media (max-width: 360px) {
    /* 背包网格 - 单列布局 */
    .inventory-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 雇佣农民区域 ========== */
.hire-farmer-section {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    padding: 0;
}

.hire-section-header {
    background: #f8f8f8;
    border-bottom: 2px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hire-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hire-section-header .close-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
}

.hire-section-header .close-btn:hover {
    background: #f0f0f0;
    border-color: #333;
    color: #333;
}

.farmer-configs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
}

.farmer-config-card {
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.farmer-config-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.config-card-header {
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
    padding: 12px 15px;
}

.config-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.config-card-body {
    padding: 15px;
}

.config-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.config-stats {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
}

.stat-item i {
    display: block;
    font-size: 18px;
    color: #666;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 3px;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.config-card-footer {
    padding: 12px 15px;
    background: #f8f8f8;
    border-top: 1px solid #ddd;
}

.btn-hire {
    width: 100%;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: 1px solid #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-hire:hover {
    background: #000;
    border-color: #000;
}

.btn-hire i {
    font-size: 14px;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .farmer-configs-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 12px;
    }
    
    .hire-section-header {
        padding: 12px 15px;
    }
    
    .hire-section-header h3 {
        font-size: 16px;
    }
    
    .config-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 8px 12px;
    }
    
    .stat-item i {
        display: inline;
        margin-bottom: 0;
        margin-right: 8px;
    }
    
    .stat-label,
    .stat-value {
        display: inline;
    }
    
    .stat-label::after {
        content: ": ";
    }
}

/* ========== 市场页面样式 ========== */
.market-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.badge-rarity {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
}

/* 市场筛选区域 */
.market-filter-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-search input {
    flex: 1;
    min-width: 200px;
}

.filter-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f0f0f0;
    border-color: #333;
}

.filter-btn-active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.filter-btn-active:hover {
    background: #000;
    border-color: #000;
}

.filter-btn-active span {
    color: #fff !important;
}

/* 手机端市场表格优化 */
@media (max-width: 768px) {
    .market-section {
        padding: 15px;
    }
    
    .market-section h3 {
        font-size: 16px;
        margin-bottom: 15px !important;
    }
    
    .market-filter-section {
        padding: 12px 15px;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-search {
        width: 100%;
    }
    
    .filter-search input {
        width: 100%;
        min-width: 0;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filter-btn {
        flex: 1 1 calc(33.333% - 4px);
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        text-align: center;
    }
}

/* ========== 排行榜页面样式 ========== */
.rank-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #ddd;
}

.rank-tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
    border-right: 1px solid #eee;
}

.rank-tab:last-child {
    border-right: none;
}

.rank-tab:hover {
    color: #333;
    background: #f5f5f5;
}

.rank-tab-active {
    color: #fff;
    background: #333;
}

.rank-tab i {
    margin-right: 6px;
    font-size: 14px;
}

.rank-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.rank-item:hover {
    background: #fafafa;
    border-color: #999;
}

.rank-item-current {
    background: #f5f5f5;
    border-color: #333;
    border-left: 3px solid #333;
}

.rank-item-current:hover {
    background: #f5f5f5;
    border-color: #333;
}

.rank-position {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.position-number {
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

.medal {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.medal i {
    font-size: 24px;
}

.medal span {
    font-size: 14px;
    font-weight: 700;
}

.medal-gold i {
    color: #333;
}

.medal-gold span {
    background: #333;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}

.medal-silver i {
    color: #666;
}

.medal-silver span {
    background: #666;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}

.medal-bronze i {
    color: #999;
}

.medal-bronze span {
    background: #999;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}

.rank-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 24px;
    color: #999;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-detail {
    font-size: 13px;
    color: #999;
}

.badge-me {
    display: inline-block;
    padding: 2px 8px;
    background: #333;
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    font-weight: 600;
}

.rank-value {
    flex-shrink: 0;
    text-align: right;
    padding: 0 15px;
}

.value-main {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.value-label {
    font-size: 12px;
    color: #999;
}

/* 排行榜统计卡片 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    transition: all 0.2s;
}

.stat-card:hover {
    background: #fafafa;
    border-color: #999;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
    color: #666;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* 排行榜页面标题样式 */
.rank-header {
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.rank-header h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 排行榜响应式设计 */
@media (max-width: 1024px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 页面标题 */
    .page-header h2 {
        font-size: 20px !important;
    }
    
    /* Tab切换 */
    .rank-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .rank-tab {
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 12px 15px;
    }
    
    .rank-tab:last-child {
        border-bottom: none;
    }
    
    .rank-tab-active {
        background: #333;
        color: #fff;
    }
    
    .rank-tab i {
        display: none;
    }
    
    /* 统计卡片 */
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
        gap: 10px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .stat-icon i {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    /* 排行榜区域 */
    .rank-section {
        padding: 15px;
    }
    
    .rank-header h3 {
        font-size: 16px;
    }
    
    .rank-header p {
        font-size: 12px !important;
    }
    
    /* 排行榜列表项 */
    .rank-item {
        padding: 12px;
    }
    
    .rank-position {
        width: 45px;
    }
    
    .position-number {
        font-size: 15px;
    }
    
    .medal i {
        font-size: 18px;
    }
    
    .medal span {
        font-size: 11px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    .user-avatar i {
        font-size: 18px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-detail {
        font-size: 11px;
    }
    
    .badge-me {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .rank-value {
        padding: 0 8px;
    }
    
    .value-main {
        font-size: 16px;
    }
    
    .value-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    /* 页面标题 */
    .page-header h2 {
        font-size: 18px !important;
    }
    
    /* 统计卡片单列显示 */
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px 12px;
    }
    
    /* 排行榜列表项垂直布局 */
    .rank-item {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        gap: 10px;
    }
    
    .rank-position {
        width: 40px;
        flex-shrink: 0;
    }
    
    .position-number {
        font-size: 14px;
    }
    
    .medal i {
        font-size: 16px;
    }
    
    .medal span {
        font-size: 10px;
    }
    
    .rank-user {
        flex: 1;
        min-width: 0;
        gap: 10px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .user-avatar i {
        font-size: 16px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .user-detail {
        font-size: 10px;
    }
    
    .rank-value {
        width: 100%;
        text-align: left;
        padding: 10px 0 0 0;
        border-top: 1px solid #eee;
        margin-left: 40px;
    }
    
    .value-main {
        display: inline-block;
        font-size: 16px;
        margin-right: 5px;
    }
    
    .value-label {
        display: inline-block;
        font-size: 11px;
    }
}

/* ========== 日志页面样式 ========== */
.log-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}

.log-section .table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.log-section .table thead {
    background: #f5f5f5;
}

.log-section .table th,
.log-section .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.log-section .table th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.log-section .table td {
    color: #333;
    font-size: 14px;
}

.log-section .table tbody tr:hover {
    background: #fafafa;
}

/* 分页器统一样式 */
.pagination-wrapper {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: inline-flex;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination li,
.page-item {
    display: inline-block;
    list-style: none;
}

.pagination li a,
.pagination li span,
.page-link {
    display: inline-block;
    padding: 8px 12px;
    min-width: 36px;
    text-align: center;
    color: #666;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 13px;
}

.pagination li a:hover,
.page-link:hover {
    color: #333;
    background: #f5f5f5;
    border-color: #999;
}

.pagination li.active span,
.pagination li.active a,
.page-item.active .page-link {
    color: #fff !important;
    background: #333 !important;
    border-color: #333 !important;
    font-weight: 600;
}

.pagination li.disabled span,
.pagination li.disabled a,
.page-item.disabled .page-link {
    color: #ccc;
    background: #f9f9f9;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

.pagination li.disabled a:hover,
.page-item.disabled .page-link:hover {
    color: #ccc;
    background: #f9f9f9;
    border-color: #e0e0e0;
}

/* 日志页面响应式 */
@media (max-width: 768px) {
    .log-section {
        padding: 15px;
        overflow-x: auto;
    }
    
    .log-section .table {
        font-size: 12px;
    }
    
    .log-section .table th,
    .log-section .table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    /* 分页器手机端优化 */
    .pagination li a,
    .pagination li span,
    .page-link {
        padding: 6px 10px;
        min-width: 32px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .log-section {
        padding: 10px;
    }
    
    .log-section .table th,
    .log-section .table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    /* 分页器小屏优化 */
    .pagination,
    .pagination-wrapper {
        gap: 3px;
    }
    
    .pagination li a,
    .pagination li span,
    .page-link {
        padding: 5px 8px;
        min-width: 28px;
        font-size: 11px;
    }
}

/* ========== 商城页面样式 ========== */
.action-btn-active {
    background: #4caf50 !important;
    color: #fff !important;
    border-color: #4caf50 !important;
}

.action-btn-active:hover {
    background: #45a049 !important;
    border-color: #45a049 !important;
}

.disabled-row {
    opacity: 0.5;
    background: #fafafa;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    font-size: 14px;
    color: #999;
    margin: 0;
}
