/* 评论区样式 */
.comments-section {
    margin-top: 40px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #333; /* 确保所有文字默认为深色 */
}

.comments-section h2 {
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.avg-rating {
    font-size: 0.8em;
    display: flex;
    align-items: center;
    color: #333;
}

.comments-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.sort-button {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.sort-button.active {
    background-color: #4CAF50;
    color: #333;
    border-color: #4CAF50;
}

.comments-list {
    margin-bottom: 20px;
    color: #333;
}

.comment {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    color: #333;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #333;
}

.comment-author {
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}

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

.comment-rating {
    display: flex;
    align-items: center;
    color: #333;
}

.comment-content {
    margin-bottom: 10px;
    line-height: 1.5;
    color: #333;
}

.reply-button {
    background: none;
    border: none;
    color: #4CAF50;
    cursor: pointer;
    padding: 5px 0;
    font-size: 0.9em;
}

.reply-button:hover {
    text-decoration: underline;
}

.comment-replies {
    margin-top: 10px;
    margin-left: 20px;
    padding-left: 10px;
    border-left: 2px solid #ddd;
    color: #333;
}

.reply {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    color: #333;
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #333;
}

.reply-author {
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}

.reply-time {
    color: #555;
    font-size: 0.8em;
}

.reply-content {
    line-height: 1.4;
    color: #333;
}

.comments-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination-button {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    color: #333;
}

.pagination-button.active {
    background-color: #4CAF50;
    color: #333;
    border-color: #4CAF50;
}

.comment-form-container {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #333;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #333;
}

.comment-form h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #333;
}

.form-group label {
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    color: #333;
}

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

.form-hint {
    color: #777;
    font-size: 0.8em;
    margin-top: 3px;
}

.star-rating {
    display: flex;
    gap: 5px;
}

.star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star.active {
    color: #FFD700;
}

.star.half-active {
    position: relative;
    color: #ddd;
}

.star.half-active::before {
    content: '★';
    position: absolute;
    color: #FFD700;
    width: 50%;
    overflow: hidden;
}

.form-buttons {
    display: flex;
    gap: 10px;
}

.action-button.small {
    padding: 8px 15px;
    font-size: 0.9em;
    color: #333;
}

.action-button.secondary {
    background-color: #ccc;
    color: #333;
}

.loading-comments,
.no-comments,
.error-message {
    padding: 20px;
    text-align: center;
    color: #555;
}

.hidden {
    display: none;
} 