/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    font-size: 20px;
    font-weight: bold;
    color: #1890ff;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-list li {
    margin: 0 15px;
}

.nav-list a {
    color: #333;
    font-size: 16px;
}

.nav-list a:hover {
    color: #1890ff;
}

.user-info {
    display: flex;
    align-items: center;
}

.username {
    margin-right: 10px;
}

.dropdown {
    position: relative;
}

.avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 8px 0;
    min-width: 120px;
    display: none;
    z-index: 10;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

/* 主体内容 */
.main {
    padding-top: 84px;
    padding-bottom: 40px;
    min-height: calc(100vh - 120px);
}

.user-center {
    display: flex;
    margin-top: 20px;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    margin-right: 20px;
    flex-shrink: 0;
}

.user-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.avatar-large {
    margin: 0 auto 15px;
    width: 80px;
    height: 80px;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.user-name {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.user-balance {
    margin-bottom: 15px;
    color: #666;
}

.balance {
    font-weight: 500;
    color: #1890ff;
}

.btn-recharge {
    width: 100%;
}

.sidebar-menu {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    transition: all 0.3s;
    text-decoration: none;
}

.sidebar-menu li.active a {
    color: #1890ff;
    background-color: #e6f7ff;
    border-right: 3px solid #1890ff;
}

.sidebar-menu a:hover {
    background-color: #f5f5f5;
}

/* 内容区域 */
.content {
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.card-body {
    padding: 24px;
}

/* 账户概览 */
.info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: center;
}

.info-label {
    width: 100px;
    color: #666;
}

.info-value {
    flex: 1;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.status-active {
    background-color: #e6f7ff;
    color: #1890ff;
}

/* 资源使用情况 */
.resource-stats {
    display: flex;
    justify-content: space-between;
}

.resource-item {
    text-align: center;
    padding: 20px;
    flex: 1;
    border-right: 1px solid #f0f0f0;
}

.resource-item:last-child {
    border-right: none;
}

.resource-title {
    color: #666;
    margin-bottom: 10px;
}

.resource-value {
    font-size: 24px;
    font-weight: 500;
    color: #1890ff;
}

/* 个人资料 */
.avatar-upload {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit input[type="file"] {
    display: none;
}

.btn-default {
    color: #333;
    background-color: #fff;
    border-color: #d9d9d9;
}

.btn-default:hover {
    color: #40a9ff;
    border-color: #40a9ff;
}

/* 账单记录 */
.billing-filter {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.filter-item label {
    margin-right: 10px;
    white-space: nowrap;
}

.filter-item select {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.billing-table {
    width: 100%;
    overflow-x: auto;
}

.billing-table table {
    width: 100%;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.billing-table th {
    background-color: #fafafa;
    font-weight: 500;
}

.bill-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.bill-consume {
    background-color: #fff2e8;
    color: #fa8c16;
}

.bill-recharge {
    background-color: #e6f7ff;
    color: #1890ff;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
}

.pagination .page-item.active {
    background-color: #1890ff;
    color: #fff;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

/* 页脚 */
.footer {
    background-color: #f7f7f7;
    padding: 30px 0;
    color: #666;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    margin: 0 10px;
    color: #666;
    text-decoration: none;
}

.footer-links a:hover {
    color: #1890ff;
}

.footer-copyright {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .user-center {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .info-list {
        grid-template-columns: 1fr;
    }
    
    .resource-stats {
        flex-direction: column;
    }
    
    .resource-item {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .resource-item:last-child {
        border-bottom: none;
    }
    
    .billing-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-item {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .filter-item select {
        width: 100%;
    }
}