/* 基础变量定义 */
:root {
    --primary-color: #165DFF;
    --secondary-color: #4E5969;
    --text-color: #1D2129;
    --light-bg: #F2F3F5;
    --border-color: #E5E6EB;
    --hover-bg: #F7F8FA;
}

/* 基础布局 */
#messContent {
    margin: 0 auto;
    max-width: 1000px;
    padding: 20px;
}

.loading, .no-comments {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: var(--secondary-color);
}

/* 用户信息区域 - 更加突出和专业 */
.user-info-container {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0E42B3 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* 背景装饰效果 */
.user-info-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.2;
    pointer-events: none;
}

.user-avatar {
    margin-right: 24px;
    position: relative;
    z-index: 1;
}

.user-avatar img {
    width: 96px;
    height: 96px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-details {
    flex: 1;
    position: relative;
    z-index: 1;
}

.user-welcome {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.user-name {
    font-weight: bold;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-bottom-color 0.3s;
}

.user-name:hover {
    border-bottom-color: white;
}
.user-name a{ color: white; }

.user-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

.user-stats-item {
    display: flex;
    flex-direction: column;
}

.user-stats-value {
    font-size: 18px;
    font-weight: 500;
}

.user-stats-label {
    font-size: 14px;
    opacity: 0.8;
}

.user-first-comment {
    margin-top: 12px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
}

.user-first-comment a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-bottom-color 0.3s;
}

.user-first-comment a:hover {
    border-bottom-color: white;
}

/* 评论区域 */
.comments-container {
    margin-top: 24px;
}

.comment-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 16px;
    background-color: var(--bs-body-bg);;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 评论悬停效果 */
.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* 评论顶部装饰线 */
.comment-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.comment-item:hover::before {
    transform: scaleX(1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.comment-title {
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

.comment-title a {
    text-decoration: none;
    /*color: var(--text-color);*/
    transition: color 0.3s;
}

.comment-title a:hover {
    color: var(--primary-color);
}

.comment-time {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 400;
}

.comment-body {
    display: flex;
    align-items: flex-start;
}

.comment-avatar {
    margin-right: 16px;
    margin-top: 2px;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.comment-content {
    flex: 1;
    line-height: 1.6;
    /*color: var(--text-color);*/
    font-size: 15px;
}

/* 回复区域 */
.replies-container {
    margin-top: 16px;
    padding-left: 24px;
    border-left: 2px solid var(--light-bg);
}

.replies-title {
    font-size: 14px;
    margin: 12px 0 16px -24px;
    padding-left: 12px;
    border-left: 2px solid var(--primary-color);
    font-weight: 500;
    /*color: var(--secondary-color);*/
}

.reply-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
    background-color: var(--bs-secondary-bg);
    transition: all 0.3s ease;
}

.reply-item:hover {
   /* background-color: var(--hover-bg);*/
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.reply-avatar {
    margin-right: 10px;
}

.reply-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.reply-meta {
    flex: 1;
}

.reply-author {
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.reply-author:hover {
    color: #0E42B3;
}

.reply-time {
    color: var(--secondary-color);
    font-size: 12px;
    margin-left: 8px;
}

.reply-content {
    line-height: 1.5;
    /*color: var(--text-color);*/
    font-size: 14px;
}

/* 动画定义 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为每个评论项设置延迟动画 */
.comment-item {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards;
}

.comment-item:nth-child(1) { animation-delay: 0.1s; }
.comment-item:nth-child(2) { animation-delay: 0.2s; }
.comment-item:nth-child(3) { animation-delay: 0.3s; }
.comment-item:nth-child(4) { animation-delay: 0.4s; }
.comment-item:nth-child(5) { animation-delay: 0.5s; }
.comment-item:nth-child(n+6) { animation-delay: 0.6s; }

/* 响应式设计 */
@media (max-width: 768px) {
    .user-info-container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .user-stats {
        justify-content: center;
        margin-top: 16px;
    }
    
    .comment-item {
        padding: 16px;
    }
    
    .comment-avatar img {
        width: 40px;
        height: 40px;
    }
    
    .replies-container {
        padding-left: 16px;
    }
    
    .replies-title {
        margin-left: -16px;
    }
}    