
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    overflow-y: auto;
    padding: 5px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    max-width: 550px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(68, 85, 102, 0.3);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.4s ease;
}

.modal-large {
    max-width: 900px;
}

.close-modal {
    position: sticky;
    top : 0px;
    float: right;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal h2 {
    color: var(--text-primary);
    margin-bottom: 28px;
    font-size: 28px;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(68, 85, 102, 0.3);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    background: var(--bg-card);
}


.movie-details-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.movie-details-poster img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.movie-details-info h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 32px;
    font-weight: 800;
}

.genre-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.genre-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.user-rating-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-stars {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    cursor: pointer;
}

.modal-star {
    font-size: 24px;
    color: var(--text-muted);
    transition: color 0.1s ease, transform 0.1s ease;
    user-select: none;
}

.modal-star.active,
.modal-star.hover {
    color: #fbbf24;
}

.modal-star:hover {
    transform: scale(1.2);
}

.movie-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

/*Style de base commun*/
.movie-actions .btn {
    flex: 1;
    border-width: 2px;
    border-style: solid;
    font-weight: 700;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.movie-actions .btn:active {
    transform: scale(0.96);
}



/*cropper avatar*/
#cropperModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    padding: 16px;
    overflow-y: auto;
}

#cropperModal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#cropperModal .modal-content {
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
    background: #000;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
}

#cropperModal .cropper-container-wrapper {
    width: 100%;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imageToCrop {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    display: block;
    object-fit: contain;
}

#cropperModal .cropper-footer {
    padding: 12px 16px;
    background: #1f2327;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #334;
    flex-shrink: 0;
}

#cancelCropBtn {
    padding: 8px 16px;
    font-size: 14px;
    border: 2px solid #445566;
    background: transparent;
    color: #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cancelCropBtn:hover {
    background: rgba(68, 85, 102, 0.2);
    color: white;
}

#cropAndSaveBtn {
    padding: 8px 20px;
    font-size: 14px;
    background: var(--primary, #3b82f6);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#cropAndSaveBtn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

#cropAndSaveBtn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    #cropperModal {
        padding: 8px;
    }
    
    #cropperModal .modal-content {
        max-height: calc(100vh - 16px);
        border-radius: 16px;
    }
    
    #cropperModal .cropper-container-wrapper {
        max-height: calc(100vh - 90px);
    }
    
    #imageToCrop {
        max-height: calc(100vh - 90px);
    }
    
    #cropperModal .cropper-footer {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    #cropperModal .cropper-container-wrapper {
        max-height: calc(100vh - 80px);
    }
    
    #imageToCrop {
        max-height: calc(100vh - 80px);
    }
    
    #cancelCropBtn,
    #cropAndSaveBtn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

.cropper-view-box,
.cropper-face {
    border-radius: 50%;
    outline: 0;
}

.cropper-point {
    background-color: #3b82f6;
}

.cropper-line {
    background-color: #3b82f6;
}

.cropper-modal {
    opacity: 0.8;
    background-color: #000;
}

.cropper-container {
    max-height: 100% !important;
}