.rating-modal {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.rating-header {
    background: linear-gradient(to right, #4776E6, #8E54E9);
    padding: 2rem;
    text-align: center;
    color: white;
}

.rating-header h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.rating-emotions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.rating-emotions button {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0.5rem;
}

.rating-emotions button:hover,
.rating-emotions button.selected {
    transform: scale(1.25);
}

.rating-emotions button:disabled {
    cursor: default;
    opacity: 0.7;
}

.rating-feedback {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rating-content {
    padding: 2rem;
}

.feedback-section textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    background-color: #f9fafb;
    border-radius: 0.75rem;
    min-height: 100px;
    font-size: 1.125rem;
    resize: vertical;
}

.feedback-section textarea:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.share-section {
    margin-top: 1.5rem;
}

.share-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease;
    gap: 0.75rem;
}

.social-btn:hover {
    opacity: 0.9;
}

.social-btn i {
    font-size: 1.5rem;
}

.social-btn.facebook { background-color: #1877F2; }
.social-btn.twitter { background-color: #1DA1F2; }
.social-btn.linkedin { background-color: #0A66C2; }
.social-btn.email { background-color: #EA4335; }

.quick-share {
    background-color: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
}

.quick-share h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.quick-share-buttons {
    display: flex;
    gap: 0.75rem;
}

.copy-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-link:hover {
    background-color: #f9fafb;
}

.copy-link i {
    color: #6b7280;
}

.submit-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(to right, #4776E6, #8E54E9);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 1.5rem;
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-button:not(:disabled):hover {
    opacity: 0.9;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    transform: translate(-50%, -50%);
}

/* Animations */
@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .rating-modal {
        margin: 1rem;
        max-width: none;
    }

    .rating-emotions {
        gap: 1rem;
    }

    .rating-emotions button {
        font-size: 2rem;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }
    
    .social-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    .social-btn i {
        font-size: 1.25rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .rating-emotions button,
    .social-btn,
    .copy-link,
    .submit-button {
        transition: none;
    }
}

/* Focus States */
.rating-emotions button:focus,
.social-btn:focus,
.copy-link:focus,
.submit-button:focus {
    outline: 2px solid #4776E6;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (forced-colors: active) {
    .rating-emotions button.selected,
    .submit-button,
    .social-btn {
        border: 1px solid currentColor;
    }
}