/* ===================================
   用户中心现代化样式 - 优化版
   User Center Modern Styles - Optimized
   =================================== */

/* 重置默认间距 */
body {
    margin: 0;
    padding: 0;
}

/* 基础布局 */
.userMain {
    display: flex;
    min-height: calc(100vh - 0px);
    background: #f5f7fa;
    margin-top: 0;
    padding-top: 0;
}

/* 侧边栏样式 - 紧贴顶部 */
.userMain .sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a1c23 0%, #2d3436 100%);
    min-height: calc(100vh - 0px);
    max-height: calc(100vh - 0px);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.userMain .sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.userMain .sidebar ul {
    list-style: none;
    padding: 20px 0 30px 0;
    margin: 0;
}

.userMain .sidebar li {
    margin: 3px 12px;
}

.userMain .sidebar li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.userMain .sidebar li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.userMain .sidebar li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(5px);
}

.userMain .sidebar li a:hover::before {
    transform: scaleY(1);
}

.userMain .sidebar li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.userMain .sidebar li.active a::before {
    transform: scaleY(1);
}

.userMain .sidebar .layui-icon {
    margin-right: 14px;
    font-size: 18px;
    width: 22px;
    text-align: center;
    transition: transform 0.3s ease;
}

.userMain .sidebar li a:hover .layui-icon {
    transform: scale(1.1);
}

/* 内容区域 */
.userIndex {
    flex: 1;
    margin-left: 240px;
    padding: 25px 30px;
    min-height: calc(100vh - 0px);
    margin-top: 0;
}

/* 统计卡片网格 */
.userIndex .layui-row.layui-col-space20 {
    margin-bottom: 20px;
}

/* 首张卡片（欢迎区域）优化 */
.userIndex .layui-card[style*="margin-bottom: 30px"] {
    margin-bottom: 20px !important;
}

.userIndex .layui-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.userIndex .layui-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.userIndex .layui-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.userIndex .layui-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 15px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.userIndex .layui-card-body {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.userIndex .layui-card-body a.layui-font-26 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.userIndex .layui-card-body a.layui-font-26:hover {
    transform: scale(1.1);
}

/* 快捷菜单卡片 */
.userIndex .userMenu {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.userIndex .userMenu .layui-col-xs3 {
    padding: 15px;
    border-right: 1px solid #f0f0f0;
}

.userIndex .userMenu .layui-col-xs3:last-child {
    border-right: none;
}

.userIndex .userMenu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    border-radius: 12px;
    background: #f8f9fa;
    height: 100%;
}

.userIndex .userMenu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.userIndex .userMenu .layui-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #667eea;
    transition: all 0.3s ease;
}

.userIndex .userMenu a:hover .layui-icon {
    color: #fff;
    transform: scale(1.1);
}

.userIndex .userMenu span {
    font-size: 14px;
    font-weight: 500;
}

/* 管理页面卡片 */
.userIndex .userSites {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 20px;
}

.userIndex .userSites h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 18px 25px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.userIndex .userSites h3::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    margin-right: 12px;
    border-radius: 2px;
}

.userIndex .userSites hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, #667eea, transparent);
    margin: 0;
}

/* 表格样式优化 */
.userIndex .layui-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.userIndex .layui-table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.userIndex .layui-table th {
    background: transparent;
    color: #fff;
    font-weight: 600;
    padding: 12px 12px;
    font-size: 13px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.userIndex .layui-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.userIndex .layui-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.userIndex .layui-table td {
    padding: 12px 12px;
    color: #495057;
    font-size: 13px;
}

/* 状态标签优化 */
.userIndex .layui-font-green {
    display: inline-block;
    padding: 6px 14px;
    background: #d4edda;
    color: #155724;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.userIndex .layui-font-orange {
    display: inline-block;
    padding: 6px 14px;
    background: #fff3cd;
    color: #856404;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.userIndex .layui-font-red {
    display: inline-block;
    padding: 6px 14px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.userIndex .layui-font-gray {
    display: inline-block;
    padding: 6px 14px;
    background: #e2e3e5;
    color: #383d41;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 操作链接 */
.userIndex .layui-font-blue {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

.userIndex .layui-font-blue:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

/* 分页样式 */
.userIndex .layui-laypage {
    margin: 20px 0 0 0;
}

.userIndex .layui-laypage a,
.userIndex .layui-laypage span {
    border-radius: 8px;
    margin: 0 5px;
}

.userIndex .layui-laypage .layui-laypage-curr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .userMain .sidebar {
        width: 220px;
    }
    
    .userIndex {
        margin-left: 220px;
        padding: 20px 25px;
    }
}

@media (max-width: 992px) {
    .userMain .sidebar {
        width: 200px;
    }
    
    .userIndex {
        margin-left: 200px;
        padding: 18px 20px;
    }
    
    .userIndex .userMenu .layui-col-xs3 {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .userIndex .layui-card-body a.layui-font-26 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .userMain .sidebar {
        width: 60px;
    }
    
    .userMain .sidebar li a span {
        display: none;
    }
    
    .userMain .sidebar .layui-icon {
        margin-right: 0;
        font-size: 20px;
    }
    
    .userMain .sidebar li a {
        padding: 12px 0;
        justify-content: center;
    }
    
    .userMain .sidebar li {
        margin: 3px 6px;
    }
    
    .userIndex {
        margin-left: 60px;
        padding: 15px 12px;
    }
    
    .userIndex .layui-card-body a.layui-font-26 {
        font-size: 32px;
    }
    
    .userIndex .layui-table th,
    .userIndex .layui-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .userIndex .userSites h3 {
        font-size: 16px;
        padding: 20px 15px;
    }
}

@media (max-width: 576px) {
    .userIndex {
        padding: 12px 8px;
    }
    
    .userIndex .layui-card-body {
        padding: 20px 15px;
    }
    
    .userIndex .userMenu a {
        padding: 15px 10px;
    }
    
    .userIndex .userMenu .layui-icon {
        font-size: 24px;
    }
    
    .userIndex .userMenu span {
        font-size: 12px;
    }
}

/* 滚动条美化 */
.userMain .sidebar::-webkit-scrollbar {
    width: 6px;
}

.userMain .sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.userMain .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.userMain .sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.userIndex .layui-card,
.userIndex .userSites {
    animation: fadeIn 0.5s ease-out;
}

/* 加载动画 */
.userIndex .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    color: #667eea;
    font-size: 16px;
}

/* 空状态 */
.userIndex .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
}

.userIndex .empty-state .layui-icon {
    font-size: 56px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.userIndex .empty-state p {
    font-size: 15px;
    margin: 0;
}

/* 搜索框样式 */
.userIndex .search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.userIndex .search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.userIndex .search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.userIndex .search-box button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.userIndex .search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
