/* 评论系统样式 - 美化版 */
.comments-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    margin-top: 40px;
}

.comments-title {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-count {
    font-size: 0.65em;
    color: #888;
    font-weight: normal;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 15px;
}

/* 评论表单 */
.comment-form {
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e8ecf1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* 验证码样式 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e8ecf1;
    margin: 20px 0;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.captcha-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.captcha-refresh {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border: none;
    cursor: pointer;
    font-size: 1.3em;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-refresh:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: rotate(180deg);
}

.captcha-input {
    width: 120px;
}

.captcha-input input {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    letter-spacing: 2px;
}

.captcha-hint {
    font-size: 0.85em;
    color: #888;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-error {
    color: #e74c3c;
    font-size: 0.9em;
    margin: 15px 0;
    min-height: 20px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
}

.comment-form button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.comment-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.comment-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 评论列表 */
.comments-list {
    min-height: 50px;
}

.no-comments,
.error {
    text-align: center;
    color: #888;
    padding: 50px;
    font-style: italic;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 15px;
}

/* 单个评论 */
.comment-item {
    display: flex;
    gap: 18px;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.comment-avatar.bot {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    font-size: 24px;
}

.bot-comment {
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
    border-left: 4px solid #ff6b6b;
}

.comment-body {
    flex: 1;
}

.comment-header {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
}

.comment-email {
    font-size: 0.75em;
    color: #999;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 10px;
}

.comment-time {
    font-size: 0.8em;
    color: #aaa;
    margin-left: auto;
}

.comment-content {
    color: #555;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95em;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 0.85em;
    cursor: pointer;
    margin-top: 12px;
    padding: 5px 12px;
    border-radius: 15px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.comment-reply-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* 嵌套回复 */
.comment-replies {
    margin-left: 66px;
    padding-left: 20px;
    border-left: 3px solid #f0f0f0;
}

.comment-replies .comment-item {
    padding: 18px 0;
}

/* 响应式 */
@media (max-width: 600px) {
    .comments-section {
        padding: 25px 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .captcha-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .captcha-input {
        width: 100%;
    }
    
    .captcha-input input {
        width: 100%;
    }
    
    .comment-replies {
        margin-left: 20px;
        padding-left: 10px;
    }
    
    .comment-form button[type="submit"] {
        width: 100%;
    }
}
