/* 评论和评分系统样式 */
.rating-container,
.comments-container {
    margin-top: 40px;
}

.rating-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.rating-section h3,
.comments-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.rating-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.average-rating {
    text-align: center;
}

.rating-number {
    font-size: 3em;
    font-weight: bold;
    color: #f39c12;
    display: block;
}

.stars-display {
    margin: 10px 0;
}

.star {
    font-size: 1.5em;
    color: #ddd;
}

.star.full {
    color: #f39c12;
}

.star.half {
    background: linear-gradient(to right, #f39c12 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.review-count {
    color: #7f8c8d;
    font-size: 0.9em;
}

.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 10px;
}

.bar-label {
    font-size: 0.9em;
    color: #666;
}

.bar-container {
    background: #e0e0e0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    background: #f39c12;
    height: 100%;
    transition: width 0.3s ease;
}

.bar-count {
    font-size: 0.9em;
    color: #666;
    text-align: right;
}

.rate-this {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.rate-this h4 {
    margin-bottom: 15px;
    color: #495057;
}

.star-rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.star-input {
    font-size: 2em;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-input:hover,
.star-input.preview {
    color: #f39c12;
}

.star-input.active {
    color: #f39c12;
}

.submit-rating-btn,
.submit-comment-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.submit-rating-btn:hover,
.submit-comment-btn:hover {
    background: #2980b9;
}

/* 评论部分 */
.comments-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.comment-form h4 {
    margin-bottom: 20px;
    color: #495057;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.comments-list {
    margin-top: 30px;
}

.no-comments {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
}

.comment-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.comment-header strong {
    color: #2c3e50;
}

.comment-rating {
    display: flex;
}

.comment-rating .star {
    font-size: 1em;
}

.comment-date {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-left: auto;
}

.comment-meta {
    margin-bottom: 10px;
}

.experience-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 15px;
    font-size: 0.85em;
}

.comment-body {
    color: #555;
    line-height: 1.6;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    z-index: 1000;
}

.message.success {
    background: #27ae60;
}

.message.error {
    background: #e74c3c;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .rating-summary {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .average-rating {
        padding-bottom: 20px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .comment-header {
        flex-wrap: wrap;
    }
    
    .comment-date {
        margin-left: 0;
        width: 100%;
        margin-top: 5px;
    }
    
    .star-rating-input {
        justify-content: center;
    }
}