.user-rating-block {
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Contributor Selector */
.contributor-selector {
    margin-bottom: 30px;
}

.contributor-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.contributor-select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: #fff;
    transition: border-color 0.3s;
}

.contributor-select:focus {
    outline: none;
    border-color: #ffb900;
}

/* Overall Rating */
.overall-rating {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.overall-rating h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
}

.overall-stars {
    margin-bottom: 15px;
}

.overall-stars .star {
    font-size: 40px;
    color: #ddd;
    transition: color 0.2s;
    cursor: default;
}

.overall-stars .star.filled {
    color: #ffb900;
}

.overall-stars .star.half-filled {
    background: linear-gradient(90deg, #ffb900 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-summary {
    font-size: 18px;
    color: #666;
}

.average-rating {
    font-weight: 700;
    font-size: 24px;
    color: #333;
}

/* Rating Form */
.rating-form {
    margin-bottom: 40px;
    padding: 25px;
    background: #f5f5f5;
    border-radius: 8px;
}

.rating-form h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color:var(--blue);
}

.star-rating {
    margin-bottom: 20px;
}

.star-rating label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color:var(--blue);
}

.stars-input {
    display: inline-block;
}

.star-input {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.star-input:hover {
    transform: scale(1.1);
}

.star-input.filled {
    color: #ffb900;
}

.review-text {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
}

.review-text label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

.review-text textarea {
    width: 100%;
    padding: 20px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

.review-text textarea:focus {
    outline: none;
    border-color: #ffb900;
}

/* Assigned User Section */
.assigned-user-section {
    margin-bottom: 20px;
}

.assigned-user-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--blue);
}

.assigned-user-select {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: #fff;
    transition: border-color 0.3s;
}

.assigned-user-select:focus {
    outline: none;
    border-color: #ffb900;
}

.assigned-user-help {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--blue);
    font-style: italic;
}

.submit-rating {
    background: #ffb900;
    color: #fff;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-rating:hover {
    background: #e6a700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-rating:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.rating-message {
    display: none;
    margin-top: 15px;
    padding: 12px;
    border-radius: 5px;
    font-weight: 600;
}

.rating-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rating-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Prompt */
.login-prompt,
.self-rating-notice {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 30px;
}

.login-prompt p,
.self-rating-notice p {
    margin: 0;
    font-size: 16px;
    color: #856404;
}

.self-rating-notice {
    background: #e7f3ff;
    border-color: #b3d9ff;
}

.self-rating-notice p {
    color: #004085;
}

.login-prompt a {
    color: #0073aa;
    font-weight: 600;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Reviews List */
.reviews-list {
    margin-top: 40px;
}

.reviews-list h4 {
    margin: 0 0 20px 0;
    font-size: 22px;
    color: #333;
    border-bottom: 2px solid #ffb900;
    padding-bottom: 10px;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #ffb900;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.review-header strong {
    font-size: 16px;
    color: #333;
}

.review-stars {
    display: inline-block;
}

.review-stars .star {
    font-size: 18px;
    color: #ddd;
}

.review-stars .star.filled {
    color: #ffb900;
}

.review-date {
    font-size: 14px;
    color: #999;
    margin-left: auto;
}

.review-text {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-top: 10px;
}

.review-meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.assigned-user-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e7f3ff;
    color: #0066cc;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #b3d9ff;
}

.no-reviews {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .user-rating-block {
        padding: 20px;
    }
    
    .overall-stars .star {
        font-size: 32px;
    }
    
    .star-input {
        font-size: 28px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-date {
        margin-left: 0;
    }
}


.contributor-search-container {
    margin-bottom: 30px;
}

.contributor-search-container label,
.assigned-user-section label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    letter-spacing: 0.3px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.contributor-search-input,
.assigned-user-search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: #f8f9fa;
}

.contributor-search-input:focus,
.assigned-user-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.contributor-search-input::placeholder,
.assigned-user-search-input::placeholder {
    color: #99a3ad;
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.search-wrapper:focus-within .search-icon {
    opacity: 0.7;
}

.search-results {
    position: absolute;
    width: 100%;
    max-width: 600px;
    max-height: 400px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 1000;
    margin-top: 8px;
}

.search-results.active {
    display: block;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 770px;
    padding: 30px 0px 30px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 0 12px 12px 0;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.search-result-item {
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-result-item:first-child {
    border-radius: 12px 12px 0 0;
}

.search-result-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.search-result-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
}

.search-result-item.selected {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateX(4px);
}

.search-result-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e1e8ed;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.search-result-item:hover .search-result-avatar,
.search-result-item.selected .search-result-avatar {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-email {
    font-size: 13px;
    color: #718096;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #718096;
    font-size: 15px;
}

.search-no-results:before {
    content: '🔍';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.search-loading {
    padding: 40px 20px;
    text-align: center;
    color: #667eea;
    font-size: 15px;
    font-weight: 500;
}

.search-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e1e8ed;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .search-wrapper {
        max-width: 100%;
    }
    
    .search-results {
        max-width: 100%;
    }
    
    .contributor-search-input,
    .assigned-user-search-input {
        padding: 14px 45px 14px 16px;
        font-size: 14px;
    }
    
    .search-result-avatar {
        width: 40px;
        height: 40px;
    }
    
    .search-result-name {
        font-size: 14px;
    }
    
    .search-result-email {
        font-size: 12px;
    }
}
</style>