/* Comments Section */
.comments-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.comments-header h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
}

.comments-count {
    color: var(--text-light);
    font-size: 1rem;
}

/* Average Rating */
.average-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.average-rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.average-rating-stars {
    flex: 1;
}

.average-rating-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.average-rating-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 0.25rem;
    font-size: 1.5rem;
}

.star {
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.star.filled {
    color: #FFC107;
}

.star:hover {
    transform: scale(1.1);
}

/* Comment Form */
.comment-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.comment-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.rating-input {
    margin-bottom: 1.5rem;
}

.rating-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.rating-stars {
    display: flex;
    gap: 0.5rem;
}

.rating-star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-star:hover,
.rating-star.selected {
    color: #FFC107;
    transform: scale(1.1);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.comment-item:hover {
    box-shadow: var(--shadow-lg);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.comment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.comment-rating {
    display: flex;
    gap: 0.25rem;
}

.comment-rating .star {
    font-size: 1.25rem;
    cursor: default;
}

.comment-text {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 1rem;
}

.no-comments {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-comments p {
    font-size: 1.1rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #ECFDF5;
    color: #10B981;
    border-left: 4px solid #10B981;
}

.alert-error {
    background: #FEE2E2;
    color: #EF4444;
    border-left: 4px solid #EF4444;
}

.alert-info {
    background: #EFF6FF;
    color: #3B82F6;
    border-left: 4px solid #3B82F6;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .comment-form {
        padding: 1.5rem;
    }
    
    .comments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .average-rating {
        flex-direction: column;
        text-align: center;
    }
    
    .comment-author {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}