/* 评论区样式 */
.comments-section {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.comments-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--text-color);
    font-weight: bold;
}

.comment-form {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color-light);
}

.comment-form-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    background-color: var(--input-bg);
    color: var(--text-color);
    margin-bottom: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.25);
    outline: none;
}

.comment-form textarea:disabled {
    background-color: var(--input-disabled-bg, #f5f5f5);
    color: var(--text-disabled, #999);
    cursor: not-allowed;
}

/* 评论按钮样式 */
.comment-submit-btn {
    align-self: flex-end;
    padding: 10px 20px;
    background-color: #ff6b81 !important;
    color: white !important;
    border: none !important;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
    opacity: 1 !important;
}

.comment-submit-btn:hover:not(:disabled) {
    background-color: #ff4757 !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    opacity: 1 !important;
}

.comment-submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #ff3545 !important;
    opacity: 1 !important;
}

.comment-submit-btn:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    animation: none;
    transform: none;
    box-shadow: none;
}

.comment-form button {
    align-self: flex-end;
    padding: 10px 20px;
    background-color: #ff6b81 !important;
    color: white !important;
    border: none !important;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
    opacity: 1 !important;
}

.comment-form button:hover:not(:disabled) {
    background-color: #ff4757 !important;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    opacity: 1 !important;
}

.comment-form button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #ff3545 !important;
    opacity: 1 !important;
}

.comment-form button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    animation: none;
    transform: none;
    box-shadow: none;
}

.comments-list {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 10px;
}

.comment-item {
    margin-bottom: 15px;
    padding: 14px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in-out;
    border-left: 3px solid var(--primary-color-light);
}

/* 评论头部样式 */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.comment-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color-light);
}

.comment-username {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.comment-content {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-color);
    word-break: break-word;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.comment-actions button {
    background: none;
    border: none;
    padding: 5px 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 4px;
}

.comment-actions button:hover {
    color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

#no-comments-message {
    text-align: center;
    padding: 25px;
    color: var(--text-secondary);
    font-style: italic;
    background-color: rgba(var(--primary-color-rgb), 0.05);
    border-radius: 8px;
    margin-top: 15px;
}

#comments-loading {
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加评论区域的悬停效果 */
.comment-form:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* 添加一些强调色，使评论区更加突出 */
.comments-section h3 i {
    color: var(--primary-color);
    margin-right: 5px;
}

.comment-form-title i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* 评论按钮呼吸效果，使其更加吸引注意 */
@keyframes pulse {
    0% {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(255, 107, 129, 0.7);
    }
    70% {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 10px rgba(255, 107, 129, 0);
    }
    100% {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 0 0 rgba(255, 107, 129, 0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-user-info {
        width: 100%;
    }
    
    .comment-date {
        align-self: flex-end;
        font-size: 0.8rem;
    }
    
    .comment-avatar {
        width: 28px;
        height: 28px;
    }
    
    .comment-username {
        font-size: 0.85rem;
    }
}

/* 适配深色模式 */
.dark-mode .comment-item {
    background-color: var(--card-bg-dark);
    border: 1px solid var(--border-color-dark);
}

.dark-mode .comment-form textarea {
    background-color: var(--input-bg-dark);
    border-color: var(--border-color-dark);
    color: var(--text-color-light);
}
