/* 引入字体（如果全局已引入可删除） */
@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');

/* 仅作用于评论容器内部的样式，不污染全局 */
.comment-list-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* 评论列表容器：替代原body的flex布局，实现响应式 */
.comment-list-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 顶部对齐，避免卡片高度不一致时错位 */
    flex-wrap: wrap; /* 自动换行，实现响应式 */
    gap: 50px; /* 卡片间距（宽屏），可根据需求调整 */
    padding: 40px 20px; /* 容器内边距，适配窄屏 */
    min-height: auto; /* 取消原body的100vh，随内容高度自适应 */
    width: 100%; /* 占满父容器宽度 */
    max-width: 1200px; /* 限制最大宽度，避免宽屏过度拉伸 */
    margin: 0 auto; /* 水平居中 */
}

/* 评论卡片外层容器 */
.comment-list-container .box {
    position: relative;
    border-radius: 20px;
    transform-style: preserve-3d;
    /* 响应式宽度：宽屏约占一半，窄屏占满 */
    flex: 0 0 calc(50% - 25px); /* 50%宽度 - 一半gap，实现并排两个 */
    max-width: calc(50% - 25px);
    margin-bottom: 40px; /* 换行后上下间距 */
}

/* 卡片主体样式 */
.comment-list-container .box .card {
    position: relative;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    width: 100%; /* 改为100%，适配外层响应式宽度 */
    min-height: 400px;
    border: 1px solid rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.75);
    border-left: 1px solid rgba(255,255,255,0.75);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0,0,0,0.05);
    transform-style: preserve-3d;
}

/* 卡片内部元素通用样式 */
.comment-list-container .elements {
    position: absolute;
    top: 50px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    transform: translateZ(80px);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.75);
    border-left: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 25px 45px rgba(0,0,0,0.05);
}

/* 引用图标样式 */
.comment-list-container .bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url(https://s3.cflmy.cn/cflmy/left-quote.png); /* 确保该图片路径正确 */
    background-size: 60px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: 0.5s;
}

.comment-list-container .box:hover .bg::before {
    opacity: 1;
}

/* 头像容器样式 */
.comment-list-container .imgBx {
    top: 0px;
    left: initial;
    right: 60px;
    width: 120px;
    height: 120px;
    padding: 10px;
    transform: translateZ(120px);
    overflow: hidden;
}

.comment-list-container .imgBx img {
    position: absolute;
    width: calc(100% - 20px);
    border-radius: 8px;
    opacity: 0;
    transition: 0.5s;
    border: 1px solid rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.75);
    border-left: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 25px 45px rgba(0,0,0,0.05);
    object-fit: cover; /* 新增：头像自适应填充，避免变形 */
    height: calc(100% - 20px); /* 新增：头像高度适配容器 */
}

.comment-list-container .box:hover .imgBx img {
    opacity: 1;
}

/* 评论内容容器样式 */
.comment-list-container .content {
    top: initial;
    left: initial;
    right: -20px;
    bottom: 0;
    width: 85%;
    min-height: 200px;
    padding: 10px;
    transform: translateZ(180px);
    overflow: hidden;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.comment-list-container .content p {
    position: relative;
    color: #644651;
    font-size: 0.85em;
    transform-style: preserve-3d;
    opacity: 0;
    transition: 0.5s;
    transition-delay: 0.5s;
    line-height: 1.5; /* 新增：增加行高，提升阅读体验 */
}

.comment-list-container .box:hover .content p {
    opacity: 1;
}

/* 用户名容器样式 */
.comment-list-container .name {
    top: 235px;
    left: initial;
    right: 0px;
    padding: 10px;
    width: 100%;
    text-align: right;
    transform: translateZ(180px);
    overflow: hidden;
    background: transparent;
    backdrop-filter: blur(0);
    border: none;
    box-shadow: none;
    color: #644651;
    font-weight: 100;
    opacity: 0;
    transition: 0.5s;
    transition-delay: 0.25s;
}

.comment-list-container .box:hover .name {
    opacity: 1;
    top: 135px;
}

/* 保留之前所有样式，仅替换/新增以下响应式部分 */

/* 保留之前所有样式，仅替换响应式部分 */

/* 宽屏样式不变，这里仅展示窄屏优化 */
@media (max-width: 768px) {
    .comment-list-container .box {
        flex: 0 0 100%;
        max-width: 100%;
        /* 给卡片加内边距，避免元素贴边 */
        padding: 0 10px;
    }
    .comment-list-container {
        gap: 30px;
        padding: 20px 15px;
    }
    /* 重点：头像容器强制靠右 */
    /* 评论内容：居中显示，适配头像靠右 */
    .comment-list-container .content {
        right: 10px; /* 与头像容器对齐 */
        left: 10px; /* 同时设left/right，让内容居中填充 */
        width: calc(100% - 20px); /* 自适应宽度 */
    }
    /* 用户名容器：跟随头像靠右 */
    .comment-list-container .name {
        right: 15px; /* 比头像多5px，视觉更协调 */
        text-align: right; /* 强制文字靠右 */
    }
}

/* 超小屏（480px以下）进一步强化靠右 */
@media (max-width: 480px) {
    .comment-list-container .name {
        right: 10px;
    }
}