.friend-profile-modal {
    padding: 0 !important;
    background: var(--bg-elevated);
    border-radius: 24px;
    overflow: hidden;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 5px;
}
.friend-profile-modal::-webkit-scrollbar {
    width: 8px;
}

.friend-profile-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.friend-profile-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.friend-profile-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Header avec cover et avatar */
.friend-profile-header {
    position: relative;
}

.friend-profile-cover {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.friend-profile-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: coverAnimation 15s ease-in-out infinite;
}

@keyframes coverAnimation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.friend-profile-avatar-wrapper {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.friend-profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--bg-elevated);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.friend-profile-info {
    text-align: center;
    padding: 0 32px;
}

.friend-profile-username {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.friend-profile-since {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.friend-profile-since svg {
    opacity: 0.7;
}

/* Stats */
.friend-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.friend-profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.friend-profile-stat:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.friend-profile-stat-icon {
    font-size: 28px;
    line-height: 1;
}

.friend-profile-stat-content {
    text-align: center;
}

.friend-profile-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.friend-profile-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/*films */
.friend-profile-section {
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.friend-profile-section:last-child {
    border-bottom: none;
    padding-bottom: 40px;
}

.friend-profile-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.friend-profile-section-icon {
    font-size: 24px;
}

.friend-profile-movies {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.friend-profile-movie {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 2/3;
    background: rgba(255, 255, 255, 0.05);
}

.friend-profile-movie:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.friend-profile-movie img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.friend-profile-movie-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.friend-profile-movie:hover .friend-profile-movie-overlay {
    opacity: 1;
}

.friend-profile-movie-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.friend-profile-movie-rating {
    font-size: 12px;
    color: #fbbf24;
    font-weight: 600;
}

/* état vide */
.friend-profile-empty {
    text-align: center;
    padding: 60px 32px;
}

.friend-profile-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.friend-profile-empty p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0;
}

/* Profil privé */
.friend-profile-private {
    text-align: center;
    padding: 60px 40px;
}

.friend-profile-private-icon {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.friend-profile-private-avatar {
    margin-bottom: 24px;
}

.friend-profile-private-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.friend-profile-private h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.friend-profile-private-text {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0 0 24px 0;
}

.friend-profile-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.friend-profile-private .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
}

.friend-profile-modal .close-modal {
    position: sticky;
    top: 16px;
    right: 16px;
    float: right;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.friend-profile-modal .close-modal:hover {
    background: rgba(255, 0, 0, 0.8);
    border-color: rgba(255, 0, 0, 0.5);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .friend-profile-modal {
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .friend-profile-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 20px;
    }
    
    .friend-profile-section {
        padding: 24px 20px;
    }
    
    .friend-profile-movies {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .friend-profile-cover {
        height: 140px;
    }
    
    .friend-profile-avatar {
        padding-top: -50px;
        width: 100px;
        height: 100px;
    }
    
    .friend-profile-username {
        font-size: 24px;
    }
    
    .friend-profile-private {
        padding: 40px 24px;
    }
    
    .friend-profile-info {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .friend-profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .friend-profile-stat {
        padding: 12px;
    }
    
    .friend-profile-stat-icon {
        font-size: 24px;
    }
    
    .friend-profile-stat-value {
        font-size: 20px;
    }
    
    .friend-profile-movies {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

/*Moadal film des amis*/

.friends-movie-modal-container {
    max-width: 500px;
    max-height: 80vh;
    background: var(--bg-elevated);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.friends-movie-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.friends-movie-modal-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Header */
.friends-movie-modal-header {
    padding: 32px 24px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.friends-movie-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.friends-movie-modal-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.friends-movie-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.friends-movie-modal-body::-webkit-scrollbar {
    width: 8px;
}

.friends-movie-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.friends-movie-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.friends-movie-section {
    margin-bottom: 28px;
}

.friends-movie-section:last-child {
    margin-bottom: 0;
}

.friends-movie-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.friends-movie-section-icon {
    font-size: 24px;
    line-height: 1;
}

.friends-movie-section-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.friends-movie-section-count {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.friends-movie-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friends-movie-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.friends-movie-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    background: rgba(59, 130, 246, 0.05);
}

.friends-movie-item-avatar {
    position: relative;
    flex-shrink: 0;
}

.friends-movie-item-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.friends-movie-item-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid var(--bg-card);
}

.friends-movie-item-badge.liked {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.friends-movie-item-badge.watched {
    background: linear-gradient(135deg, #10b981, #059669);
}

.friends-movie-item-info {
    flex: 1;
    min-width: 0;
}

.friends-movie-item-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friends-movie-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.friends-movie-item-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fbbf24;
    font-weight: 600;
}

.friends-movie-item-date {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
}

.friends-movie-item-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.friends-movie-item:hover .friends-movie-item-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

.friends-movie-modal-loading,
.friends-movie-modal-empty,
.friends-movie-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
}

.friends-movie-modal-empty-icon {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.friends-movie-modal-empty h2,
.friends-movie-modal-error h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.friends-movie-modal-empty p,
.friends-movie-modal-error p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* badge cliquable dans le modal film */
.movie-friends-badge {
    transition: all 0.3s ease;
}

.movie-friends-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.movie-friends-badge:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .friends-movie-modal-container {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
    }
    
    .friends-movie-modal-header {
        padding: 28px 20px 20px;
    }
    
    .friends-movie-modal-header h2 {
        font-size: 20px;
    }
    
    .friends-movie-modal-body {
        padding: 16px;
    }
    
    .friends-movie-item {
        padding: 12px;
    }
    
    .friends-movie-item-avatar img {
        width: 48px;
        height: 48px;
    }
    
    .friends-movie-item-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .friends-movie-item-name {
        font-size: 15px;
    }
    
    .friends-movie-item-meta {
        font-size: 12px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .friends-movie-modal-header h2 {
        font-size: 18px;
    }
    
    .friends-movie-section-header h3 {
        font-size: 16px;
    }
    
    .friends-movie-item {
        gap: 12px;
    }
}