body {
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #303133;
}

.layout {
    min-height: 100vh;
    background-color: #f5f7fa;
}

.header {
    background-color: #fff;
    border-bottom: 1px solid #ebeef5;
    padding: 0;
    height: 60px !important;
    line-height: 60px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    margin-right: 20px;
    display: flex;
    gap: 10px;
}

.logo {
    height: 60px;
    line-height: 60px;
    margin: 0 20px;
    color: #303133;
    font-size: 18px;
    font-weight: bold;
}

.main-content {
    padding: 80px 0 0 200px;
    min-height: calc(100vh - 120px);
    background-color: #f5f7fa;
    display: flex;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 200px;
    background-color: #fff;
    border-right: 1px solid #ebeef5;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.menu-group {
    margin-bottom: 20px;
}

.menu-group-title {
    padding: 15px 20px 5px;
    color: #909399;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item {
    display: block;
    padding: 12px 20px;
    color: #606266;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: #f5f7fa;
    color: #409EFF;
}

.menu-item.active {
    background-color: #ecf5ff;
    color: #409EFF;
    border-left-color: #409EFF;
}

.submenu-item {
    padding: 8px 20px 8px 40px;
    font-size: 14px;
}

.content-area {
    flex: 1;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

.page-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

.page-title {
    margin: 0 0 10px 0;
    color: #303133;
    font-size: 20px;
    font-weight: 500;
}

.page-subtitle {
    margin: 0;
    color: #909399;
    font-size: 14px;
}

.right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ebeef5;
}

.search-input {
    width: 250px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fb;
    border-radius: 8px;
    border: 1px solid #ebeef5;
}

.section-title {
    margin: 0 0 20px 0;
    color: #303133;
    font-size: 16px;
    font-weight: 500;
}

.upload-container {
    width: 100%;
}

.upload-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    border: 1px dashed #c0c4cc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
}

.upload-trigger:hover {
    border-color: #409EFF;
    background: #f5f7fa;
}

.upload-trigger i {
    font-size: 32px;
    color: #909399;
    margin-bottom: 10px;
}

.upload-trigger.has-file {
    border-color: #409EFF;
    background: #f0f7ff;
}

.upload-trigger.has-file i {
    color: #409EFF;
}

.upload-tip {
    font-size: 12px;
    color: #909399;
    margin-top: 10px;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ebeef5;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.avatar-grid-item {
    background: #fff;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #607dc6;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    aspect-ratio: 3/4;
}

.avatar-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #409EFF;
}

.avatar-preview {
    flex: 1;
    width: 100%;
    margin: 0;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    overflow: hidden;
    position: relative;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-preview i {
    font-size: 40px;
    color: #909399;
    position: absolute;
}

.avatar-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(5px);
}

.avatar-name {
    color: #303133;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    font-weight: 500;
}

.avatar-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #f5f7fa;
}

.avatar-status.active {
    color: #67C23A;
    background: #f0f9eb;
}

.avatar-status.inactive {
    color: #909399;
    background: #f4f4f5;
}

.avatar-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-grid-item:hover .avatar-actions {
    opacity: 1;
}

.avatar-actions .el-button {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

.avatar-actions .el-button i {
    font-size: 16px;
}

.avatar-actions .el-button--text {
    color: #606266;
}

.avatar-actions .el-button--text:hover {
    color: #409EFF;
    background: rgba(255, 255, 255, 0.95);
}

.avatar-actions .el-button--text:last-child:hover {
    color: #F56C6C;
}

.footer {
    text-align: center;
    background: #fff;
    color: #909399;
    padding: 20px;
    border-top: 1px solid #ebeef5;
}

/* 滚动条样式 */
.avatar-grid::-webkit-scrollbar {
    width: 6px;
}

.avatar-grid::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}

.avatar-grid::-webkit-scrollbar-track {
    background: #f5f7fa;
    border-radius: 3px;
}

.preview-container {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fb;
    border-radius: 6px;
    border: 1px solid #ebeef5;
}

.preview-video {
    width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.preview-audio {
    width: 100%;
    height: 40px;
    border-radius: 4px;
}

.settings-form {
    padding: 20px;
}

.settings-form .el-form-item {
    margin-bottom: 20px;
}

.avatar-detail-container {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fb;
    border-radius: 8px;
    border: 1px solid #ebeef5;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    color: #303133;
    font-size: 16px;
    font-weight: 500;
}

.detail-section p {
    margin: 8px 0;
    color: #606266;
}

.detail-section strong {
    color: #303133;
    margin-right: 8px;
    font-weight: 500;
}

.avatar-detail-dialog {
    width: 600px !important;
}

.avatar-detail-dialog .el-message-box__content {
    padding: 0;
}

.avatar-detail-dialog video,
.avatar-detail-dialog audio {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-toolbar {
    padding: 10px 0;
    background: #f5f7fa;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.preview-iframe {
    width: 100%;
    aspect-ratio: 9 / 16;
    border: none;
    background: #fff;
    border-radius: 4px;
}