/**
 * 作者页面样式
 */

/* 作者信息区域 */

.author-header {
    background: var(--bg-color);
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.author-card {
    position: relative;
    overflow: hidden;
    min-height: 260px; /* 可根据实际调整 */
}

.author-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    border-radius: 12px;
}

.author-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 40px;
    padding: 40px;
    align-items: center;
    margin-top: -24%;
    background: rgb(240 234 234 / 40%);
}

.author-avatar {
    flex-shrink: 0;
    position: relative;
}

.author-card, .sidebar-author-card {
    position: relative;
    overflow: hidden;
}
.author-card > *, .sidebar-author-card > * {
    position: relative;
    z-index: 1;
}

.author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.author-avatar .avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.author-avatar .avatar-placeholder i {
    font-size: 48px;
    color: #aaa;
}

.author-avatar img:hover,
.author-avatar .avatar-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.author-info {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-name {
    margin: 0 0 15px;
    font-size: 2rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.author-description {
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    max-width: 700px;
}

.author-meta {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.author-meta div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-meta .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 5px;
}

.author-meta .stat-label {
    font-size: 0.85rem;
    color: #4d4d4d;
}

.author-meta i {
    display: none;
}

.author-meta .author-url {
    margin-left: auto;
    flex-direction: row;
    align-items: center;
}

.author-meta .author-url i {
    display: inline-block;
    color: var(--primary-color);
    margin-right: 5px;
}

.author-meta a {
    color: #777;
    text-decoration: none;
    transition: color 0.3s;
}

.author-meta a:hover {
    color: var(--primary-color);
}

.author-social {
    display: flex;
    gap: 15px;
    align-items: center;
}

.author-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #555;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.3);
}

/* 关注按钮样式 */
.author-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-left: auto;
    flex-direction: row;
    align-items:flex-end;
    position: absolute;
    bottom: 50px;
    right: 0;
}

.follow-btn, .message-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 22px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(124, 63, 204, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.follow-btn:hover, .message-btn:hover {
    background: #7c8cf8;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 63, 204, 0.18);
}

.message-btn {
    background: #f2f2f2;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.message-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 内容区域 */
.content-area {
    width: 100%;
}

/* 标签页 */
.content-header {
    margin-bottom: 30px;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 0;
    overflow: hidden;
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}

.content-tabs {
    display: flex;
    position: relative;
    padding: 0 40px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 18px 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
    color: #666;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-label {
    position: relative;
}

.tab-count {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 添加滑动指示器 */
.tab-btn-indicator {
    position: absolute;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: all 0.3s ease;
}

/* 内容区域 */
.content-section-wrapper {
    position: relative;
}

.content-section {
    opacity: 0;
    transform: translateY(20px);
    display: none;
    transition: all 0.3s ease-out;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
    margin-bottom: 30px;
}

/* 文章卡片 */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.post-card {
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    height: auto;
    visibility: visible;
    border: 1px solid rgba(0,0,0,0.03);
}

.post-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    visibility: hidden;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(124, 63, 204, 0.1);
}

.post-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* 占位图样式 */
.post-thumbnail .placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f2f5;
}

.post-thumbnail .placeholder-image:after {
    content: '\f03e';
    font-family: 'Font Awesome 5 Free';
    font-size: 2rem;
    color: #ccc;
}

.post-categories {
    padding: 15px 15px 0;
    font-size: 0.8rem;
}

.post-categories a {
    display: inline-block; 
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    margin-right: 5px;
    margin-bottom: 5px;
}

.post-title {
    padding: 10px 15px;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    padding: 0 15px 15px;
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #888;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta i {
    color: #aaa;
}

.post-excerpt {
    padding: 0 15px;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #666;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-readmore {
    padding: 0 15px 20px;
}

.read-more {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 1px solid var(--primary-color);
    font-weight: 500;
}

.read-more:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.2);
}

/* 评论列表样式 */
.author-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 769px) { 
    .author-comments {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.comment-item {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-left: 3px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.comment-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
    flex-grow: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.comment-article-link {
    font-size: 0.9rem;
    color: #777;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-article-link a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.comment-article-link a:hover {
    color: #6a7bef;
    text-decoration: underline;
}

.comment-article-link i {
    color: #aaa;
}

.comment-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 作者页评论列表样式调整 */
.author-comments .comment-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.author-comments .comment-content {
    flex-grow: 1;
}

.author-comments .comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    width: 100%;
}

.author-comments .author-date-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.author-comments .comment-author {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 5px;
}

.author-comments .comment-date {
    font-size: 0.85rem;
    color: #888;
}

.author-comments .reply-info-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.author-comments .comment-reply-to {
    font-size: 0.9rem;
    color: #666;
}

.author-comments .comment-reply-to a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.author-comments .comment-reply-to a:hover {
    color: #6a7bef;
    text-decoration: underline;
}

/* 作者页评论列表样式调整 */
.author-comments .depth-1{
    padding: 15px;
    background: var(--bg-color);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border-left: 2px solid var(--primary-color);
    border-radius: 12px;
}
.author-comments .children{
    margin-top: 15px;
    background: #f7f7f7;
    padding: 15px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .author-comments {
        display: block;
    }
    
    .comment-item {
        margin-bottom: 15px;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* 粉丝列表样式 */
.followers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* 粉丝选项卡样式 */
.followers-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(124, 63, 204, 0.1);
    padding: 0 20px;
}

.followers-tab {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.followers-tab .tab-count {
    background: rgba(124, 63, 204, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    min-width: 24px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.followers-tab:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.followers-tab.active {
    color: var(--primary-color);
}

.followers-tab.active:after {
    transform: scaleX(1);
}

.followers-tab:hover {
    color: var(--primary-color);
}

/* 粉丝内容面板样式 */
.followers-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.followers-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.follower-item {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.follower-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.follower-avatar {
    flex-shrink: 0;
}

.follower-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.follower-avatar .avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.follower-avatar .avatar-placeholder i {
    font-size: 24px;
    color: #aaa;
}

.follower-info {
    flex: 1;
}

.follower-name a {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.follow-date {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.follow-back-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.follow-back-btn:hover {
    background: var(--primary-color);
    color: white;
}

.follow-back-btn.following {
    background: #e0e0e0;
    color: #666;
    border-color: #e0e0e0;
}

/* 没有内容时的提示 */
.no-posts,
.no-comments,
.no-followers {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.no-posts h2,
.no-comments h2,
.no-followers h2 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.5rem;
}

.no-posts p,
.no-comments p,
.no-followers p {
    color: #777;
    font-size: 1rem;
}

/* 分页 */
.pagination-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: var(--bg-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.2);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(124, 63, 204, 0.2);
}

.pagination .prev,
.pagination .next {
    gap: 5px;
}

/* 响应式 */
@media (max-width: 768px) {
    .author-card > *, .sidebar-author-card > * {
    position:underline;
    }
    .author-page{
        padding: 15px;
    }
    .author-comments .depth-1{
        margin-bottom: 15px;
    }
    .author-content { 
        align-items: center;
        gap: 20px;
        padding: 30px 10px 58px 10px;
        margin-top: 0;
    }
    .author-info {
        align-items: center;
        text-align: center;
    }
    .author-meta {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        width: 100%;
        margin-bottom: 15px;
        padding: 10px 0;
    }
    .author-avatar{
        margin-top: 40px;
    }
    .author-actions { 
        align-items: center;
        gap: 12px;
        width: 100%;
        margin: 0;
        bottom: -45px;
        right: 0px;
    }
    .follow-btn, .message-btn {
        width: 80%; 
        max-width: 260px;
        justify-content: center;
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
        gap: 25px;
    }
    .comment-article-link{
        display: block;
    }

    .author-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .author-name {
        font-size: 1.6rem;
    }
    
    .author-description {
        font-size: 0.95rem;
    }

    .author-meta div {
        min-width: 28%;
    }
    
    .author-meta .author-url {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }

    .author-social {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .content-tabs {
        padding: 0 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .content-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 15px;
        font-size: 0.95rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .followers-tabs {
        padding: 0 15px;
        gap: 10px;
    }
    
    .followers-tab {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .post-title {
        font-size: 1.1rem;
    }

    .post-excerpt {
        -webkit-line-clamp: 2;
    }
    
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-date {
        margin-top: 5px;
    }
    
    /* 作者页评论列表样式调整 - 手机端 */
    .author-comments .comment-body {
        flex-direction: column;
        gap: 10px; 
    }
    
    .author-comments .comment-date-info {
        text-align: left; 
        margin-top: 0; 
    }

    .comment-article-link {
        /* display: block; */ 
        display: flex; 
        flex-wrap: wrap; 
        gap: 5px; 
        font-size: 0.9rem; 
        align-items: center;
    }
    
}

/* 暗色主题适配 */
[data-theme="dark"] .author-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .comment-item,
[data-theme="dark"] .follower-item {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .post-card:hover,
[data-theme="dark"] .comment-item:hover,
[data-theme="dark"] .follower-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .content-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .author-meta {
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .author-social a {
    background: rgba(255, 255, 255, 0.1);
}

/* 统计数据更新动画 */
@keyframes statUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: var(--primary-color); }
    100% { transform: scale(1); }
}

.stat-updated {
    animation: statUpdate 0.8s ease;
}

/* 移动端滑动效果 */
@media (max-width: 768px) {
    .content-tabs.active {
        cursor: grabbing;
    }
}