/* 在评论模块CSS顶部添加以下变量定义 */
:root {
    --primary: #0B3289;        /* 主色调 - 蓝色 */
    --secondary: #ffffff;      /* 次要色调 - 紫色 */
    --success: #b2e9fa;        /* 成功色 - 青色 */
    --dark: #0B3289;           /* 深色文本 */
    --gray: #6b7280;           /* 灰色文本 */
    --light: #f8fafc;          /* 浅色背景 */
    --border: #e5e7eb;         /* 边框颜色 */
    --primary-light: #bcd8f8;  /* 浅主色 */
    --btn-primary: #003153;    /* 提交按钮未选中颜色 */
    --btn-primary-dark: #00529e; /* 提交按钮悬停颜色 */
    --btn-text: white;         /* 按钮文字颜色 */
    --reply-btn-color: #6b7280;       /* 回复按钮默认颜色 */
    --reply-btn-hover: #00529e;      /* 回复按钮悬停颜色 */
    --reply-btn-bg: transparent;     /* 回复按钮背景 */
    --reply-btn-padding: 5px 12px;   /* 回复按钮内边距 */
    --reply-btn-border: 1px solid #e5e7eb; /* 回复按钮边框 */
    --reply-btn-radius: 6px;         /* 回复按钮圆角 */
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}
/* 原评论模块CSS代码... */
    .container {
        max-width: 1000px;
        margin: 0 auto;
    }
    .custom-comment-system .comments-container {
        background: white;
        border-radius: 16px;
        box-shadow: var(--shadow);
        overflow: hidden;
        margin-bottom: 40px;
    }
.comments-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 16px;
    text-align: center;
    height: 90px; /* 设置固定高度为120px */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中内容 */
}
    .comments-header h1 {
        font-size: 1rem;
        margin-bottom: 10px;
        font-weight: 200;
    }
    .comments-header p {
        font-size: 0.7rem;
        opacity: 0.9;
        max-width: 600px;
        margin: 0 auto;
    }
    .comments-content {
        padding: 20px;
    }
    .section-title {
        font-size: 1.0rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 2px solid var(--border);
        position: relative;
        color: var(--dark);
        font-weight: 600;
    }
    .section-title::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 2px;
        background: var(--primary);
    }
    /* 评论表单样式 - 修复部分 */
    .comment-form {
        background: var(--light);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 30px;
        box-shadow: var(--shadow);
    }
    .form-group {
        margin-bottom: 15px;
    }
    .form-control {
        width: 100%;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 16px;
        font-family: 'Noto Sans SC', sans-serif;
        transition: var(--transition);
    }
    .form-control:focus {
        border-color: var(--primary-light);
        box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
        outline: none;
    }
    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }
    /* 修复验证码输入框宽度问题 */
    .captcha-container {
        display: flex;
        gap: 10px;
        align-items: center;
        width: 100%;
        /* 确保容器宽度100% */
    }
    .captcha-container input {
        flex: 1;
        /* 输入框占据剩余空间 */
        min-width: 120px;
        /* 设置最小宽度 */
    }
    .captcha-img {
        height: 46px;
        border-radius: 8px;
        cursor: pointer;
        border: 1px solid var(--border);
        transition: var(--transition);
        flex-shrink: 0;
        /* 防止图片被压缩 */
    }
    .captcha-img:hover {
        transform: scale(1.03);
    }
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--btn-primary);
    color: var(--btn-text);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans SC', sans-serif;
    width: 100%;
}
.btn:hover {
    background: var(--btn-primary-dark);
    color: var(--btn-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 103, 199, 0.3);
}
/* 回复按钮样式 */
.replybtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--reply-btn-padding);
    background: var(--reply-btn-bg);
    color: var(--reply-btn-color);
    border: var(--reply-btn-border);
    border-radius: var(--reply-btn-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans SC', sans-serif;
    white-space: nowrap;
}
.replybtn i {
    margin-right: 5px;
    font-size: 0.9rem;
}
.replybtn:hover {
    background: var(--reply-btn-hover);
    color: white;
    border-color: var(--reply-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 103, 199, 0.2);
}
    .btn i {
        margin-right: 8px;
    }
    /* 评论列表样式 */
    .comment-list {
        margin-top: 20px;
    }
    .comment-item {
        display: flex;
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 20px;
        background: white;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
        transition: var(--transition);
        border-left: 4px solid transparent;
    }
    .comment-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        border-left-color: var(--primary);
    }
    .comment-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        margin-right: 15px;
        flex-shrink: 0;
        background: linear-gradient(135deg, var(--primary-light), var(--success));
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
        font-weight: bold;
    }
    .comment-content {
        flex: 1;
    }
    .comment-header {
        display: flex;
        flex-direction: column;
        margin-bottom: 10px;
    }
    .comment-author {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--dark);
    }
    .comment-date {
        font-size: 0.85rem;
        color: var(--gray);
        margin-top: 3px;
    }
    .comment-text {
        font-size: 1rem;
        color: #444;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    .comment-actions {
        display: flex;
        gap: 12px;
    }
    .action-btn {
        display: flex;
        align-items: center;
        color: var(--gray);
        font-size: 0.9rem;
        cursor: pointer;
        transition: var(--transition);
        background: none;
        border: none;
        font-family: 'Noto Sans SC', sans-serif;
        padding: 5px 0;
    }
    .action-btn:hover {
        color: var(--primary);
    }
    .action-btn i {
        margin-right: 5px;
        font-size: 0.9rem;
    }
    .sub-comment {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed var(--border);
        padding-left: 10px;
    }
    .sub-comment .comment-item {
        background: #f9fafb;
        margin-bottom: 12px;
        padding: 15px;
    }
    .sub-comment .comment-item:last-child {
        margin-bottom: 0;
    }
    /* 分页样式 */
    .pagination {
        display: flex;
        justify-content: center;
        margin-top: 30px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .page-item {
        display: inline-block;
        flex: 1;
        min-width: 40px;
        text-align: center;
    }
    .page-link {
        display: block;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--dark);
        text-decoration: none;
        transition: var(--transition);
        font-weight: 500;
        font-size: 0.9rem;
    }
    /* 分页信息样式 */
.page-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    background: var(--light);
    min-width: 80px;
}
/* 分页按钮样式 */
.page-link:hover {
    background: var(--btn-primary);
    color: white;
    border-color: var(--btn-primary);
}
/* 模态框提交按钮 */
.modal .btn {
    background: var(--btn-primary);
}
.modal .btn:hover {
    background: var(--btn-primary-dark);
}
.replybtn i {
    margin-right: 5px;
    font-size: 0.9rem;
}
.replybtn:hover {
    background: var(--reply-btn-hover);
    color: white;
    border-color: var(--reply-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 103, 199, 0.2);
}
    .no-comments {
        text-align: center;
        padding: 30px;
        color: var(--gray);
        font-size: 1.1rem;
    }
    .no-comments i {
        font-size: 1.5rem;
        margin-bottom: 15px;
        color: #dee2e6;
    }
    .no-comments p {
    font-size: 0.8rem;
    color: var(--gray)
    }
    /* 弹窗样式 */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        align-items: center;
        justify-content: center;
        padding: 15px;
    }
    .modal-content {
        background: white;
        border-radius: 16px;
        width: 100%;
        max-width: 700px;
        box-shadow: var(--shadow);
        overflow: hidden;
    }
    .modal-header {
        padding: 18px;
        background: var(--primary);
        color: white;
        position: relative;
    }
    .modal-title {
        font-size: 1.3rem;
        font-weight: 600;
    }
    .modal-body {
        padding: 20px;
    }
    .modal-footer {
        padding: 18px;
        background: var(--light);
        display: flex;
        justify-content: flex-end;
        gap: 12px;
    }
    .btn-secondary {
        background: var(--gray);
    }
    .btn-secondary:hover {
        background: #6c757d;
    }
    .close {
        background: none;
        border: none;
        color: white;
        font-size: 1.8rem;
        cursor: pointer;
        position: absolute;
        top: 10px;
        right: 15px;
        line-height: 1;
    }
    /* 响应式设计 - 平板及以上 */
    @media (min-width: 768px) {
        .comments-header {
            height: 70px; /* 平板端高度150px */
        }
        .comments-header h1 {
            font-size: 2rem;
        }
        .comments-header p {
            font-size: 0.7rem;
        }
        .comments-content {
            padding: 20px;
        }
        .section-title {
            font-size: 1.0rem;
        }
        .comment-form {
            padding: 25px;
        }
        .comment-item {
            padding: 25px;
        }
        .comment-header {
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
        }
        .comment-date {
            margin-top: 0;
        }
        .btn {
            width: auto;
        }
        .comment-avatar {
            width: 40px;
            height: 40px;
            font-size: 22px;
        }
        .captcha-container {
            width: 100%;
            /* 确保在平板上宽度100% */
        }
    }
    /* 响应式设计 - 桌面及以上 */
    @media (min-width: 992px) {
        .comments-header {
           height: 120px; /* 桌面端高度120px */
        }
        .comments-header h1 {
            font-size: 2.2rem;
        }
        .comment-avatar {
            width: 40px;
            height: 40px;
            font-size: 24px;
        }
        .btn {
            padding: 14px 28px;
        }
    }
    /* 移动端优化 - 修复输入框宽度 */
    @media (max-width: 767px) {
        .captcha-container {
            flex-direction: column;
            /* 垂直排列 */
            align-items: stretch;
            /* 拉伸子元素宽度 */
        }
        .captcha-container input {
            width: 100%;
            /* 输入框宽度100% */
            margin-bottom: 10px;
            /* 增加间距 */
        }
        .captcha-img {
            width: 100%;
            /* 图片宽度100% */
            height: auto;
            /* 高度自适应 */
            min-height: 46px;
            /* 保持最小高度 */
            object-fit: cover;
            /* 图片适应容器 */
        }
    }
    /* 键盘优化 */
    textarea,
    input {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    /* 添加到CSS样式末尾 */
    .comment-form form {
        width: 100%;
        /* 表单宽度100% */
        box-sizing: border-box;
        /* 包含内边距和边框 */
    }
    .comment-form .form-control {
        width: 100%;
        /* 输入框宽度100% */
    }
    /* 验证码容器特殊处理 */
    .comment-form .captcha-container {
        display: flex;
        gap: 10px;
    }
    /* 添加到CSS样式末尾，确保覆盖原有规则 */
    .comment-form .captcha-container input {
        width: 160px;
        /* 固定验证码输入框宽度为180px */
        flex: 0 0 180px;
        /* 禁止伸缩，固定宽度 */
        max-width: 160px;
        /* 最大宽度限制 */
        height: 56px;
        /* 输入框高度调整为56px */
        padding: 16px;
        /* 增加内边距使文字垂直居中 */
    }
    .modal .captcha-container input {
        height: 56px;
        /* 输入框高度56px */
        padding: 16px;
        /* 内边距16px */
    }
    /* 确保图片与输入框比例协调 */
    .comment-form .captcha-img {
        width: 120px;
        /* 图片宽度可根据需要调整 */
        height: 46px;
        object-fit: cover;
        /* 图片适应容器 */
    }
    .modal .captcha-img {
        width: 120px;
        /* 图片宽度可根据需要调整 */
        height: 46px;
        object-fit: cover;
        /* 图片适应容器 */
    }
