/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

/* 头部导航 */
.header {
    background: white;
    padding: 10px 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    flex-shrink: 0;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.search-bar {
    flex: 1;
    position: relative;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar i {
    color: #999;
    font-size: 14px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icons i {
    color: #666;
    font-size: 18px;
}

.dropdown {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4CAF50;
    font-size: 12px;
}

/* 推广横幅 */
.banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 10px 15px;
    border-radius: 10px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-text h2 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: bold;
}

.banner-text p {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.banner-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.banner-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 导航图标网格 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px 15px;
    background: white;
    margin: 10px 15px;
    border-radius: 10px;
}

/* 导航网格样式 - 只影响 .nav-grid 内的元素 */
.nav-grid .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.nav-grid .nav-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.nav-grid .nav-icon.green { background: #4CAF50; }
.nav-grid .nav-icon.orange { background: #FF9800; }
.nav-grid .nav-icon.purple { background: #9C27B0; }
.nav-grid .nav-icon.pink { background: #E91E63; }
.nav-grid .nav-icon.red { background: #F44336; }

.nav-grid .nav-item span {
    font-size: 12px;
    color: #666;
}

/* 主要内容区域 */
.main-content {
    padding: 0 15px;
    margin-bottom: 80px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tabs {
    display: flex;
    gap: 20px;
}

.tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.tab.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

/* 账号列表 */
.account-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 标签页内容 */
.tab-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 交易卡片样式 */
.trade-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
}

.account-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.account-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.account-price {
    font-size: 20px;
    font-weight: bold;
    color: #F44336;
    margin-bottom: 8px;
}

.account-assets {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.asset-item {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.account-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.attr-tag {
    font-size: 11px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.account-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stat-tag {
    font-size: 11px;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.stat-tag.blue {
    background: #2196F3;
}

.account-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.account-image {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.account-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-header h3 {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.account-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.stat-box {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
    white-space: nowrap;
}

.stat-box.purple { background: #9C27B0; }
.stat-box.gray { background: #9E9E9E; }
.stat-box.pink { background: #E91E63; }
.stat-box.orange { background: #FF9800; }
.stat-box.blue { background: #2196F3; }
.stat-box.yellow { background: #FFC107; color: #333; }

.account-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.detail-box {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.detail-box.blue { background: #2196F3; }
.detail-box.orange { background: #FF9800; }
.detail-box.pink { background: #E91E63; }

.account-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.item-box {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.item-box.pink { background: #E91E63; }
.item-box.gray { background: #9E9E9E; }

.battle-pass {
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
}

.pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rental-price {
    color: #F44336;
    font-weight: bold;
    font-size: 16px;
}

.deposit-price {
    color: #666;
    font-size: 14px;
}

.detail-btn {
    background: #2196F3;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.detail-btn:hover {
    background: #1976D2;
}

/* 底部导航样式已移至 bottom-nav.css */

/* 响应式设计 */
@media (max-width: 480px) {
    .header-content {
        gap: 8px;
    }
    
    .search-bar {
        padding: 6px 12px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 15px 10px;
    }
    
    .nav-grid .nav-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .account-card {
        padding: 12px;
    }
    
    .account-stats,
    .account-details,
    .account-items {
        gap: 6px;
    }
    
    .stat-box,
    .detail-box,
    .item-box {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    /* 交易卡片移动端优化 */
    .trade-card {
        flex-direction: column;
        gap: 10px;
    }
    
    .account-image {
        width: 100%;
        height: 150px;
        align-self: center;
    }
    
    .account-title {
        font-size: 14px;
    }
    
    .account-price {
        font-size: 18px;
    }
    
    .account-assets {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .asset-item {
        font-size: 11px;
        padding: 2px 4px;
    }
    
    .attr-tag,
    .stat-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* 动画效果 */
.account-card {
    transition: transform 0.2s ease;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tab {
    transition: all 0.3s ease;
}

/* 导航网格的触摸反馈 - 只影响 .nav-grid 内的元素 */
.nav-grid .nav-item {
    transition: transform 0.2s ease;
}

.nav-grid .nav-item:active {
    transform: scale(0.95);
}

/* 加载状态样式 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 空数据状态样式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* 筛选弹窗 */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.filter-modal.show {
    display: flex;
}

.filter-content {
    background: white;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-filter {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-options.grid-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.filter-option {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-option:hover {
    background: #e9ecef;
}

.filter-option.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.range-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.range-filter span {
    font-size: 14px;
    color: #666;
}

.range-filter input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.range-filter input:focus {
    outline: none;
    border-color: #4CAF50;
}

.filter-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.filter-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn {
    background: #f5f5f5;
    color: #666;
}

.reset-btn:hover {
    background: #e9ecef;
}

.confirm-btn {
    background: #4CAF50;
    color: white;
}

.confirm-btn:hover {
    background: #45a049;
}

.confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
