.author-container {
    position: relative;
    margin-bottom: 30px;
}

.author-main {
    background: #fff;
    border: 1px solid #e9ecef;
    min-height: 600px;
    transition: margin-right 0.3s ease;
}

.author-main.sidebar-open {
    margin-right: 280px; /* 侧边栏宽度 */
}

/* 作者信息区域 */
.author-header {
    padding: 30px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: #2c3e50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.author-details {
    flex: 1;
}

.author-name {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.author-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 14px;
    color: #666;
}

.meta-label {
    color: #888;
}

.meta-value {
    color: #333;
    font-weight: 500;
}

.author-description {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
}

/* 作品列表 */
.works-section {
    padding: 30px;
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.work-item {
    border: 1px solid #e9ecef;
    padding: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
    display: block;
}

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

.work-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.work-cover {
    width: 60px;
    height: 80px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #666;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.work-info {
    flex: 1;
    min-width: 0;
}

.work-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.work-category {
    font-size: 13px;
    color: #666;
    background: #f8f9fa;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
}

.work-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.work-stats span {
    white-space: nowrap;
}

.work-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.work-actions {
    display: flex;
    gap: 12px;
}

.work-btn {
    padding: 8px 16px;
    font-size: 13px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.work-btn.primary {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.work-btn.primary:hover {
    background: #34495e;
}

.work-btn.secondary {
    background: #f8f9fa;
    color: #666;
}

.work-btn.secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* 侧边栏样式 */
.author-sidebar {
    position: fixed;
    top: 50%;
    right: -250px;
    width: 250px;
    height: 70vh;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px 0 0 8px;
    padding: 20px;
    transform: translateY(-50%);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.author-sidebar.open {
    right: 0;
}

/* 悬浮按钮 */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 1001;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    background: #34495e;
    transform: translateY(-50%) scale(1.1);
}

.sidebar-toggle.sidebar-open {
    right: 270px;
}

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

.sidebar-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: #f0f0f0;
    color: #333;
}

.recommend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
}

.recommend-item:hover {
    background: #f8f9fa;
    border-color: #2c3e50;
}

.recommend-title {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 10px;
}

.recommend-author {
    font-size: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 60px;
}

/* 主题样式 */
body.dark-theme {
    background: #1a1a1a;
    color: #e0e0e0;
}

.dark-theme .author-main {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

.dark-theme .author-header {
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
    border-color: #404040;
}

.dark-theme .author-name {
    color: #fff;
}

.dark-theme .author-description {
    color: #ccc;
}

.dark-theme .section-header {
    border-color: #404040;
}

.dark-theme .work-item {
    background: #3a3a3a;
    border-color: #555;
}

.dark-theme .work-item:hover {
    border-color: #666;
}

.dark-theme .work-title {
    color: #fff;
}

.dark-theme .work-category {
    background: #404040;
    color: #ccc;
}

.dark-theme .work-description {
    color: #ccc;
}

.dark-theme .work-btn.primary {
    background: #555;
    border-color: #555;
}

.dark-theme .work-btn.secondary {
    background: #404040;
    color: #e0e0e0;
    border-color: #555;
}

.dark-theme .author-sidebar {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

.dark-theme .sidebar-header {
    border-color: #404040;
}

.dark-theme .sidebar-close {
    color: #e0e0e0;
}

.dark-theme .sidebar-close:hover {
    background: #404040;
}

.dark-theme .recommend-item {
    background: #3a3a3a;
    border-color: #555;
}

.dark-theme .recommend-item:hover {
    background: #404040;
    border-color: #666;
}

.dark-theme .recommend-title {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .author-main.sidebar-open {
        margin-right: 0;
    }
    
    .author-header {
        padding: 20px;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
        font-size: 20px;
        align-self: center;
    }
    
    .author-name {
        font-size: 24px;
    }
    
    .author-meta {
        justify-content: center;
        gap: 15px;
    }
    
    .works-section {
        padding: 20px;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .work-item {
        padding: 15px;
    }
    
    .work-header {
        gap: 12px;
    }
    
    .work-cover {
        width: 50px;
        height: 65px;
    }
    
    .work-title {
        font-size: 16px;
    }
    
    .author-sidebar {
        width: 280px;
        right: -280px;
    }
    
    .sidebar-toggle.sidebar-open {
        right: 300px;
    }
}

@media (max-width: 480px) {
    .author-header {
        padding: 15px;
    }
    
    .works-section {
        padding: 15px;
    }
    
    .work-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .work-btn {
        text-align: center;
    }
    
    .author-sidebar {
        width: 90vw;
        right: -90vw;
    }
    
    .sidebar-toggle {
        right: 10px;
    }
    
    .sidebar-toggle.sidebar-open {
        right: calc(90vw + 20px);
    }
}